CVE-2025-40909

Public Exploit
Perl threads have a working directory race condition where file operations may target unintended paths

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

Remediation

Solution:

  • Update perl to an unaffected version, or apply the patch provided in the references section.

Category

5.9
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.01%
Affected: perl perl
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2025-40909?
CVE-2025-40909 has been scored as a medium severity vulnerability.
How to fix CVE-2025-40909?
To fix CVE-2025-40909: Update perl to an unaffected version, or apply the patch provided in the references section.
Is CVE-2025-40909 being actively exploited in the wild?
It is possible that CVE-2025-40909 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2025-40909?
CVE-2025-40909 affects perl perl.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.