Skip to main content
CVE-2025-40909VulnerabilityPublished Updated

CVE-2025-40909: perl · Race Condition

Affects perlSource CVE Database V5

0

Not known to be exploited · CVSS 5.9 Medium.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.5% chance of exploitation in 30 days – higher than 42% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 May 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Affected software

ProductAffectedFixed in
perl perlAffected
  • =5.13.6
Fixed in–

AI-suggested

1. Upgrade Perl: The most effective mitigation is to upgrade to a Perl version where this race condition is fixed. Since the vulnerability was introduced in 5.13.6, using a stable, patched release is critical. 2. Avoid multi-threaded Perl applications on vulnerable versions: Where upgrading is not immediately possible, avoid running multi-threaded Perl applications that open directory handles at thread creation. 3. Restrict local access: Limit local user privileges and restrict who can execute Perl scripts on affected systems to reduce the risk of local exploitation. 4. Code audit: Review Perl scripts and applications for unsafe file operations that rely on the current working directory or directory handles during threading. 5. Use containerization or sandboxing: Isolate Perl applications in containers or sandboxes to limit the impact of unintended file access. 6. Monitor file system activity: Implement monitoring to detect unusual file access patterns or unexpected code loading that could indicate exploitation attempts. 7. Implement strict file system permissions: Ensure that file system permissions prevent unauthorized file modifications or code injections in directories accessible to Perl processes. 8. Follow vendor advisories: Stay updated with Perl community and vendor security advisories for patches or workarounds addressing this vulnerability.

Description

Perl threads have a working directory race condition where file operations may target unintended paths. If a directory handle is open at thread creation, the process-wide current working directory is temporarily changed in order to clone that handle for the new thread, which is visible from any third (or more) thread already running. This may lead to unintended operations such as loading code or accessing files from unexpected locations, which a local attacker may be able to exploit. The bug was introduced in commit 11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6

References

Community reviews

Loading reviews…