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

Summary

CVECVE-2025-40909
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2025-05-30 13:15:22 UTC
Updated2026-04-18 15:16:18 UTC
DescriptionPerl 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

Risk And Classification

Primary CVSS: v3.1 5.9 MEDIUM from ADP

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

EPSS: 0.000340000 probability, percentile 0.096450000 (date 2026-04-18)

Problem Types: CWE-426 | CWE-689 | CWE-689 CWE-689 Permission Race Condition During Resource Copy | CWE-426 CWE-426 Untrusted Search Path


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED5.9MEDIUMCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary5.9MEDIUMCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Perl Perl affected 5.13.6 5.41.13 custom Not specified

References

ReferenceSourceLinkTags
www.openwall.com/lists/oss-security/2025/06/02/5 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
bugs.debian.org/cgi-bin/bugreport.cgi 9b29abf9-4ab0-4765-b253-1875cd9b441e bugs.debian.org
www.openwall.com/lists/oss-security/2025/05/22/2 9b29abf9-4ab0-4765-b253-1875cd9b441e www.openwall.com
www.openwall.com/lists/oss-security/2025/06/02/7 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
seclists.org/fulldisclosure/2025/Sep/53 af854a3a-2127-422b-91ae-364da2661108 seclists.org
www.openwall.com/lists/oss-security/2025/06/02/6 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
lists.debian.org/debian-lts-announce/2026/04/msg00018.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
www.openwall.com/lists/oss-security/2025/06/02/2 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
seclists.org/fulldisclosure/2025/Sep/54 af854a3a-2127-422b-91ae-364da2661108 seclists.org
www.openwall.com/lists/oss-security/2025/05/23/1 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
www.openwall.com/lists/oss-security/2025/06/03/1 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
www.openwall.com/lists/oss-security/2025/05/30/4 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
perldoc.perl.org/5.14.0/perl5136delta 9b29abf9-4ab0-4765-b253-1875cd9b441e perldoc.perl.org
github.com/Perl/perl5/issues/10387 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
github.com/Perl/perl5/issues/23010 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
seclists.org/fulldisclosure/2025/Sep/55 af854a3a-2127-422b-91ae-364da2661108 seclists.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Vincent Lefevre (en)

Additional Advisory Data

Solutions

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

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report