CVE-2025-40909Untrusted Search Path
NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Vulnerability Summary
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
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 v3.1 Base Metrics — Score 5.9 (MEDIUM)
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:LAttack VectorLocal
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityLow
IntegrityLow
AvailabilityLow
Affected & Patched Versions
Not provided by NVD for this CVE.
No patched version published yet
Until a fix ships, reduce exposure:
- Restrict access to the affected service or interface to trusted networks.
- Disable the affected feature if you do not need it.
- Watch the vendor advisory for a firmware or software update.
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run the affected product and which version.
- No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
- Subscribe to the vendor advisory so you learn when a fix ships.
Timeline
- May 30, 2025Published
- Apr 18, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get alerts for CVEs like this oneYou are reading CVE-2025-40909. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsRelated Coverage
- CVE-2025-40909: Perl Threads Vulnerability Exposes File Operation Race Condition
- Under the Hood of a Kernel Crash: PoC Exposes Race Condition in Qualcomm’s Driver
- CVE-2025-34300 (CVSS 10): Critical RCE Flaw in Lighthouse Studio’s CGI Scripts Threatens Survey Servers Worldwide
- Microsoft BFS Flaws Expose Windows to Privilege Escalation – PoC Code Released
- Apple’s AI Race: Is the Tech Giant Falling Behind?
External References
- Issue Trackinghttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226
- Patchhttps://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e
- Patchhttps://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch
- Issue Trackinghttps://github.com/Perl/perl5/issues/10387
- Issue Trackinghttps://github.com/Perl/perl5/issues/23010
- Referencehttps://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads
- Advisoryhttps://www.openwall.com/lists/oss-security/2025/05/22/2
- Advisoryhttp://seclists.org/fulldisclosure/2025/Sep/53
- Advisoryhttp://seclists.org/fulldisclosure/2025/Sep/54
- Advisoryhttp://seclists.org/fulldisclosure/2025/Sep/55
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/05/23/1
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/05/30/4
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/06/02/2
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/06/02/5
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/06/02/6
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/06/02/7
- Advisoryhttp://www.openwall.com/lists/oss-security/2025/06/03/1
- Referencehttps://lists.debian.org/debian-lts-announce/2026/04/msg00018.html
Data last checked: Nov 21, 2026 22:08 UTC