CVE-2025-40909
Perl threads have a working directory race condition where file operations may target unintended paths
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
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
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
CVSS Scores
SSVC
- Decision:Track*
Timeline
- 2025-04-16 CVE Reserved
- 2025-05-30 CVE Published
- 2025-06-03 CVE Updated
- 2025-06-03 EPSS Updated
- 2025-06-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
- CWE-426: Untrusted Search Path
CAPEC
References (8)
URL | Date | SRC |
---|---|---|
https://www.openwall.com/lists/oss-security/2025/05/22/2 | 2025-06-03 |
URL | Date | SRC |
---|---|---|
https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch | 2025-05-30 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Perl Search vendor "Perl" | Perl Search vendor "Perl" for product "Perl" | >= 5.13.6 < 5.41.13 Search vendor "Perl" for product "Perl" and version " >= 5.13.6 < 5.41.13" | en |
Affected
|