CVE-2025-40909 Perl threads have a working directory race condition where file operations may target unintended paths
MediumCVSS 5.9
EPSS 0.50%
- Published
- Updated
- Exploit status
- No public exploit known
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
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| Microsoft cm2 perl 5.34.1-491 | < 5.34.1-491 | 5.34.1-491 |
| cbl-mariner perl(CBL-Mariner:2.0) | < 5.34.1-491 | 5.34.1-491 |
| azure linux perl(Azure Linux:3.0) | < 5.38.2-509 | 5.38.2-509 |
| debian/perl(Debian:12) | < 5.36.0-7+deb12u3 | 5.36.0-7+deb12u3 |
| debian/perl(Debian:12) | = 5.36.0-7 | No fix listed |
| debian/perl(Debian:12) | = 5.36.0-7+deb12u1 | No fix listed |
| debian/perl(Debian:12) | = 5.36.0-7+deb12u2 | No fix listed |
| debian/perl(Debian:13) | < 5.40.1-5 | 5.40.1-5 |
| debian/perl(Debian:14) | < 5.40.1-5 | 5.40.1-5 |
| perl | >= 5.13.6, < 5.41.13 | 5.41.13 |
| ubuntu/perl(Ubuntu:22.04) | < 5.34.0-3ubuntu1.5 | 5.34.0-3ubuntu1.5 |
| ubuntu/perl(Ubuntu:24.04) | < 5.38.2-3.2ubuntu0.2 | 5.38.2-3.2ubuntu0.2 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-40909 vendor-advisory
- github.com patch
- www.openwall.com exploit mailing-list
- github.com issue-tracking
- bugs.debian.org related
- github.com related
- perldoc.perl.org related
- github.com related
- www.openwall.com
- www.openwall.com
- www.openwall.com
- www.openwall.com
- www.openwall.com
- www.openwall.com
- www.openwall.com
- seclists.org
- seclists.org
- seclists.org
- lists.debian.org
- Ubuntu CVE tracker vendor-advisory
- USN-7678-1 vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking