CVE-2025-40909

MEDIUM CVSS 3.1: 5.9 EPSS 0.50%
Updated Apr 18, 2026
Perl
Parameter Value
CVSS 5.9 (MEDIUM)
Type CWE-426, CWE-689
Vendor Perl
Public PoC No

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

Attack Parameters

Attack Vector
Local
Requires local access
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
Low
Partial data leak
Integrity
Low
Partial data modification
Availability
Low
Partial disruption

CVSS Vector v3.1

Weakness Type (CWE)

References 18

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.p…
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/issues/10387
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/issues/23010
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-t…
9b29abf9-4ab0-4765-b253-1875cd9b441e
https://www.openwall.com/lists/oss-security/2025/05/22/2
9b29abf9-4ab0-4765-b253-1875cd9b441e
http://seclists.org/fulldisclosure/2025/Sep/53
af854a3a-2127-422b-91ae-364da2661108
http://seclists.org/fulldisclosure/2025/Sep/54
af854a3a-2127-422b-91ae-364da2661108
http://seclists.org/fulldisclosure/2025/Sep/55
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/05/23/1
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/05/30/4
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/06/02/2
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/06/02/5
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/06/02/6
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/06/02/7
af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/06/03/1
af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html
af854a3a-2127-422b-91ae-364da2661108