CVE-2025-40909
Perl threads have a working directory race condition where file operations may target unintended paths
- 5.9MediumCVSS base score
- 0.50%Exploitation in 30 daysEPSS · top 57% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. A reference of the record is tagged as an exploit. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits1
References tagged exploit1 reference
Timeline
ID reserved
By CPANSec
- 44 days later
· 44 days later
Published
- 11 months later
· 11 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium5.9 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVDNVD · Deferred | 3.1 | Medium5.9 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
- EPSS (exploitation in 30 days)
- 0.50% · top 57% of all CVEs (11 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.9.
Affected products
What to do
Solution: Update perl to an unaffected version, or apply the patch provided in the references section.
References
References18
- https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch (opens in a new tab)patch
- https://www.openwall.com/lists/oss-security/2025/05/22/2 (opens in a new tab)mailing-listexploit
- https://github.com/Perl/perl5/issues/23010 (opens in a new tab)issue-tracking
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226 (opens in a new tab)related
- https://github.com/Perl/perl5/issues/10387 (opens in a new tab)related
- https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads (opens in a new tab)related
- https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e (opens in a new tab)related
- http://www.openwall.com/lists/oss-security/2025/05/23/1 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/05/30/4 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/06/02/2 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/06/02/5 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/06/02/6 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/06/02/7 (opens in a new tab)
- http://www.openwall.com/lists/oss-security/2025/06/03/1 (opens in a new tab)
- http://seclists.org/fulldisclosure/2025/Sep/55 (opens in a new tab)
- http://seclists.org/fulldisclosure/2025/Sep/54 (opens in a new tab)
- http://seclists.org/fulldisclosure/2025/Sep/53 (opens in a new tab)
- https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2025-16506 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2025-40909)Record last updated .