CVE-2025-40909: perl Untrusted Search Path
Vulnerability summary
CVE-2025-40909 is a medium (CVSS 5.9) Untrusted Search Path vulnerability in perl. EPSS estimates a 0.50% chance of exploitation in the next 30 days, higher than 42.1% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 3 · Related 2Timeline
- 30-05-2025PublishedVulnerability first disclosed.
- 18-04-2026Last modifiedVulnerability information updated.
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
CVSS metrics
7 scores · 7 sources · 1 version- OSV · Red hatEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- OSV · WolfiEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- OSV · ChainguardEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- NVDNIST5.9MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
EPSS trend
Probability
0.50%
Chance of exploitation in the next 30 days
Percentile
42%
Versus all other CVEs
30-day change
0.00 pp
From 0.50% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (openwall.com)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-426Untrusted Search PathThe product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.
- CWE-689Permission Race Condition During Resource CopyThe product, while copying or cloning a resource, does not set the resource's permissions or access control until the copy is complete, leaving the resource exposed to other spheres while the copy is taking place.
Affected systems
Redhat193 products
- perl< 4:5.32.1-481.el9_4.1 | < 4:5.32.1-481.1.el9_6 | < 4:5.26.3-423.el8_10 | < 4:5.40.2-512.2.el10_0 | < 4:5.32.1-471.module+el8.6.0+24484+7827d5b5.1 | < 4:5.32.1-474.module+el8.10.0+24099+8aa2f756
- perl-Algorithm-Diff< 0:1.1903-10.module+el8.6.0+13324+628a2397 | < 0:1.1903-10.module+el8.10.0+21354+3ad137bb
- perl-Archive-Tar< 0:2.38-3.module+el8.6.0+13324+628a2397 | < 0:2.38-3.module+el8.10.0+21354+3ad137bb
- perl-Archive-Zip< 0:1.68-3.module+el8.6.0+13324+628a2397 | < 0:1.68-3.module+el8.10.0+21354+3ad137bb
- perl-Attribute-Handlers< 0:1.01-481.el9_4.1 | < 0:1.01-481.1.el9_6 | < 0:0.99-423.el8_10 | < 0:1.03-512.2.el10_0 | < 0:1.01-471.module+el8.6.0+24484+7827d5b5.1 | < 0:1.01-474.module+el8.10.0+24099+8aa2f756
Opensuse2 products
- perl&distro=openSUSE Leap 15.6< 5.26.1-150300.17.20.1
- perl&distro=openSUSE Tumbleweed< 5.40.2-3.1
Chainguard1 product
- perl< 5.40.2-r1
Debian1 product
- perl< 5.36.0-7+deb12u3 | < 5.40.1-5
Perl1 product
- perl≥ 5.13.6, < 5.41.13
Ubuntu1 product
- perlAll versions (No fix recorded) | < 5.34.0-3ubuntu1.5 | < 5.38.2-3.2ubuntu0.2
Wolfi1 product
- perl< 5.40.2-r1
7 vendors · 200 products · Showing 200 of 318. Use Open JSON for the complete list.
References
47 linksShow all 47 references
- github.com/perl/perl5PACKAGE