CVE-2025-40909 | Perl threads have a working directory race condition where file operations may target unintended paths

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

Published: 2025-05-30 Last update: 2026-06-17 Assigner: 9b29abf9-4ab0-4765-b253-1875cd9b441e Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Conclusion & alert: CVE-2025-40909 is rated Low Risk (33.9/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.37%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-40909

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.01% 0.37% +0.36%
2 2025-05-31 0.01%

Full EPSS history (2 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-40909

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.9 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
2.5 3.4 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2025-40909

GitHub Security Advisory for CVE-2025-40909

GHSA-jpf5-526x-c5hw · Severity: medium — Perl threads have a working directory race condition where file operations may target unintended...

OS Trackers for CVE-2025-40909

vendor priority summary link
alpine CVE-2025-40909: 1 source package rows (perl); 56 state rows across 5 repos (3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 0, open 56. https://security.alpinelinux.org/vuln/CVE-2025-40909
debian not yet assigned CVE-2025-40909 not yet assigned priority: Debian including 1 source packages (perl), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2025-40909
redhat medium https://access.redhat.com/security/cve/CVE-2025-40909
suse medium CVE-2025-40909 severity moderate: SUSE including 741 source package names (0.1.6-1.2:perl-5.26.1-150300.17.20.1, 0.1.6-1.2:perl-base-5.26.1-150300.17.20.1, …), 1346 product×package rows across 350 product lines (Container bci/kiwi, Container bci/spack, … (350 product lines)): Fixed 1124, Known Affected 221, Known Not Affected 1. https://www.suse.com/security/cve/CVE-2025-40909/
ubuntu medium CVE-2025-40909 medium priority: Ubuntu including 1 source packages (perl), 10 status rows across 10 suites (bionic, focal, jammy, noble, oracular, plucky, questing, trusty, upstream, xenial): needs-triage 4, released 4, ignored 1, not-affected 1. https://ubuntu.com/security/CVE-2025-40909

Affected software / configurations for CVE-2025-40909

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2025-40909

URL Tags
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226
https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e
https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch
https://github.com/Perl/perl5/issues/10387
https://github.com/Perl/perl5/issues/23010
https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads
https://www.openwall.com/lists/oss-security/2025/05/22/2
http://seclists.org/fulldisclosure/2025/Sep/53
http://seclists.org/fulldisclosure/2025/Sep/54
http://seclists.org/fulldisclosure/2025/Sep/55
http://www.openwall.com/lists/oss-security/2025/05/23/1
http://www.openwall.com/lists/oss-security/2025/05/30/4
http://www.openwall.com/lists/oss-security/2025/06/02/2
http://www.openwall.com/lists/oss-security/2025/06/02/5
http://www.openwall.com/lists/oss-security/2025/06/02/6
http://www.openwall.com/lists/oss-security/2025/06/02/7
http://www.openwall.com/lists/oss-security/2025/06/03/1
https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html
cvelogic Threat Intelligence