{"api_version":"1","generated_at":"2026-04-19T01:10:58+00:00","cve":"CVE-2025-40909","urls":{"html":"https://cve.report/CVE-2025-40909","api":"https://cve.report/api/cve/CVE-2025-40909.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-40909","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-40909"},"summary":{"title":"Perl threads have a working directory race condition where file operations may target unintended paths","description":"Perl threads have a working directory race condition where file operations may target unintended paths.\n\nIf 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. \n\nThis may lead to unintended operations such as loading code or accessing files from unexpected locations, which a local attacker may be able to exploit.\n\nThe bug was introduced in commit 11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6","state":"PUBLISHED","assigner":"CPANSec","published_at":"2025-05-30 13:15:22","updated_at":"2026-04-18 15:16:18"},"problem_types":["CWE-426","CWE-689","CWE-689 CWE-689 Permission Race Condition During Resource Copy","CWE-426 CWE-426 Untrusted Search Path"],"metrics":[{"version":"3.1","source":"ADP","type":"DECLARED","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","data":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":5.9,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.1"}},{"version":"3.1","source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"LOW"}}],"references":[{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/5","name":"http://www.openwall.com/lists/oss-security/2025/06/02/5","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226","name":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.openwall.com/lists/oss-security/2025/05/22/2","name":"https://www.openwall.com/lists/oss-security/2025/05/22/2","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/7","name":"http://www.openwall.com/lists/oss-security/2025/06/02/7","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/53","name":"http://seclists.org/fulldisclosure/2025/Sep/53","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/6","name":"http://www.openwall.com/lists/oss-security/2025/06/02/6","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e","name":"https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html","name":"https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/2","name":"http://www.openwall.com/lists/oss-security/2025/06/02/2","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/54","name":"http://seclists.org/fulldisclosure/2025/Sep/54","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/05/23/1","name":"http://www.openwall.com/lists/oss-security/2025/05/23/1","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch","name":"https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/03/1","name":"http://www.openwall.com/lists/oss-security/2025/06/03/1","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2025/05/30/4","name":"http://www.openwall.com/lists/oss-security/2025/05/30/4","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads","name":"https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/Perl/perl5/issues/10387","name":"https://github.com/Perl/perl5/issues/10387","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/Perl/perl5/issues/23010","name":"https://github.com/Perl/perl5/issues/23010","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/55","name":"http://seclists.org/fulldisclosure/2025/Sep/55","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40909","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40909","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"perl","product":"perl","version":"affected 5.13.6 5.41.13 custom","platforms":[]}],"timeline":[],"solutions":[{"source":"CNA","title":"","value":"Update perl to an unaffected version, or apply the patch provided in the references section.","time":"","lang":"en"}],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Vincent Lefevre","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2025","cve_id":"40909","cve":"CVE-2025-40909","epss":"0.000340000","percentile":"0.096450000","score_date":"2026-04-18","updated_at":"2026-04-19 00:10:43"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"providerMetadata":{"dateUpdated":"2026-04-18T14:15:40.356Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"url":"http://www.openwall.com/lists/oss-security/2025/05/23/1"},{"url":"http://www.openwall.com/lists/oss-security/2025/05/30/4"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/2"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/5"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/6"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/02/7"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/03/1"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/55"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/54"},{"url":"http://seclists.org/fulldisclosure/2025/Sep/53"},{"url":"https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html"}],"title":"CVE Program Container"},{"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":5.9,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.1"}},{"other":{"content":{"id":"CVE-2025-40909","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2025-05-30T14:05:00.839656Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2025-05-30T14:09:50.842Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"collectionURL":"https://cpan.org/modules","defaultStatus":"unaffected","packageName":"perl","product":"perl","programRoutines":[{"name":"threads"}],"repo":"https://github.com/perl/perl5","vendor":"perl","versions":[{"lessThan":"5.41.13","status":"affected","version":"5.13.6","versionType":"custom"}]}],"credits":[{"lang":"en","type":"finder","value":"Vincent Lefevre"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Perl threads have a working directory race condition where file operations may target unintended paths.<br><br>If a directory handle is open at thread creation, the process-wide current working directory is temporarily changed in order to clone&nbsp;that handle for the new thread, which is visible from any third (or&nbsp;more) thread already running. <br><br>This may lead to unintended operations&nbsp;such as loading code or accessing files from unexpected locations,&nbsp;which a local attacker may be able to exploit.<br><br>The bug was introduced in commit&nbsp;11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6"}],"value":"Perl threads have a working directory race condition where file operations may target unintended paths.\n\nIf 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. \n\nThis may lead to unintended operations such as loading code or accessing files from unexpected locations, which a local attacker may be able to exploit.\n\nThe bug was introduced in commit 11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-689","description":"CWE-689 Permission Race Condition During Resource Copy","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-426","description":"CWE-426 Untrusted Search Path","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2025-09-05T13:24:00.827Z","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","shortName":"CPANSec"},"references":[{"tags":["patch"],"url":"https://github.com/Perl/perl5/commit/918bfff86ca8d6d4e4ec5b30994451e0bd74aba9.patch"},{"tags":["mailing-list","exploit"],"url":"https://www.openwall.com/lists/oss-security/2025/05/22/2"},{"tags":["issue-tracking"],"url":"https://github.com/Perl/perl5/issues/23010"},{"tags":["related"],"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098226"},{"tags":["related"],"url":"https://github.com/Perl/perl5/issues/10387"},{"tags":["related"],"url":"https://perldoc.perl.org/5.14.0/perl5136delta#Directory-handles-not-copied-to-threads"},{"tags":["related"],"url":"https://github.com/Perl/perl5/commit/11a11ecf4bea72b17d250cfb43c897be1341861e"}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Update perl to an unaffected version, or apply the patch provided in the references section."}],"value":"Update perl to an unaffected version, or apply the patch provided in the references section."}],"source":{"discovery":"UNKNOWN"},"title":"Perl threads have a working directory race condition where file operations may target unintended paths","x_generator":{"engine":"Vulnogram 0.2.0"}}},"cveMetadata":{"assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","assignerShortName":"CPANSec","cveId":"CVE-2025-40909","datePublished":"2025-05-30T12:20:11.237Z","dateReserved":"2025-04-16T09:05:34.360Z","dateUpdated":"2026-04-18T14:15:40.356Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-05-30 13:15:22","lastModifiedDate":"2026-04-18 15:16:18","problem_types":["CWE-426","CWE-689","CWE-689 CWE-689 Permission Race Condition During Resource Copy","CWE-426 CWE-426 Untrusted Search Path"],"metrics":{"cvssMetricV31":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"LOW"},"exploitabilityScore":2.5,"impactScore":3.4}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"40909","Ordinal":"1","Title":"Perl threads have a working directory race condition where file ","CVE":"CVE-2025-40909","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"40909","Ordinal":"1","NoteData":"Perl threads have a working directory race condition where file operations may target unintended paths.\n\nIf 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. \n\nThis may lead to unintended operations such as loading code or accessing files from unexpected locations, which a local attacker may be able to exploit.\n\nThe bug was introduced in commit 11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6","Type":"Description","Title":"Perl threads have a working directory race condition where file "}]}}}