CVE-2025-40909

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

MEDIUM
5.9
CVSS Score
Published: May 30, 2025 at 12:20 PM UTC
Updated: June 17, 2026 at 09:22 AM UTC
1 product affected across 1 vendorPerl

Using perl by perl?

Get instant alerts when new vulnerabilities affect perl - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.9
Exploit prediction
EPSS 0.5%
SSVC
PoC

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.13.6 ≤ v < 5.41.135.13.6
Affected range stops below 5.41.13, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (18)

Related
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226
Related
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/issues/10387
Issue Tracking
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/Perl/perl5/issues/23010
Mailing ListExploit
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://www.openwall.com/lists/oss-security/2025/05/22/2
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2025/05/23/1

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.9MEDIUMCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
LOW
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-426CWE-689

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card