CVE-2025-40909
Reported by cpansec · Published May 30, 2025
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
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| perl-Unicode-Collate-debuginfo | errata.rockylinux.org | 0:1.29-1.module+el8.10.0+40155+64ce2d41.x86_64, 0:1.29-1.module+el8.10.0+1616+0d20cc68.x86_64 |
| perl-DBM_Filter | errata.rockylinux.org | 0:0.06-474.module+el8.10.0+40155+64ce2d41.noarch |
| perl-Unicode-Collate-debugsource | errata.rockylinux.org | 0:1.29-1.module+el8.10.0+40155+64ce2d41.aarch64, 0:1.29-1.module+el8.10.0+1616+0d20cc68.aarch64 |
| perl | cpan.org | 5.41.13 |
| perl-threads-shared-debuginfo | errata.rockylinux.org | 0:1.61-457.module+el8.10.0+40155+64ce2d41.x86_64, 0:1.61-457.module+el8.10.0+1616+0d20cc68.x86_64 |
| perl-Encode-Locale | errata.rockylinux.org | 0:1.05-10.module+el8.10.0+40155+64ce2d41.src, 0:1.05-10.module+el8.10.0+40155+64ce2d41.noarch, 0:1.05-10.module+el8.10.0+1616+0d20cc68.src, 0:1.05-10.module+el8.10.0+1616+0d20cc68.noarch, 0:1.05-10.module+el8.9.0+1521+faf8d1d6.src, 0:1.05-10.module+el8.9.0+1521+faf8d1d6.noarch, 0:1.05-10.module+el8.9.0+1521+ec157587.src, 0:1.05-10.module+el8.9.0+1521+ec157587.noarch, 0:1.05-10.module+el8.9.0+1521+b0a37ee7.src, 0:1.05-10.module+el8.9.0+1521+b0a37ee7.noarch, 0:1.05-10.module+el8.9.0+1521+0101edce.src, 0:1.05-10.module+el8.9.0+1521+0101edce.noarch |
| perl-Unicode-Collate | errata.rockylinux.org | 0:1.29-1.module+el8.10.0+40155+64ce2d41.src, 0:1.29-1.module+el8.10.0+40155+64ce2d41.aarch64, 0:1.29-1.module+el8.10.0+1616+0d20cc68.src, 0:1.29-1.module+el8.10.0+1616+0d20cc68.aarch64 |
| perl-macros | errata.rockylinux.org | 4:5.32.1-474.module+el8.10.0+40155+64ce2d41.noarch |
| perl-interpreter | errata.rockylinux.org | 4:5.32.1-474.module+el8.10.0+40155+64ce2d41.x86_64 |
| perl-ExtUtils-Miniperl | errata.rockylinux.org | 0:1.09-474.module+el8.10.0+40155+64ce2d41.noarch |
| perl-Carp | errata.rockylinux.org | 0:1.50-439.module+el8.10.0+40155+64ce2d41.src, 0:1.50-439.module+el8.10.0+40155+64ce2d41.noarch, 0:1.50-439.module+el8.10.0+1616+0d20cc68.src, 0:1.50-439.module+el8.10.0+1616+0d20cc68.noarch, 0:1.50-439.module+el8.6.0+878+f93dfff7.src, 0:1.50-439.module+el8.6.0+878+f93dfff7.noarch |
| perl-FileHandle | errata.rockylinux.org | 0:2.03-474.module+el8.10.0+40155+64ce2d41.noarch |
85 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| perl | perl | 5.13.6 |
| perl | perl | 5.13.6 |
| amazon:2 | perl-Pod-Escapes | 0 |
| amazon:2023 | perl-overloading | 0 |
| amazon:2023 | perl-Locale-Maketext-Simple | 0 |
| amazon:2023 | perl-meta-notation | 0 |
| amazon:2023 | perl-File-DosGlob | 0 |
| amazon:2023 | perl-Hash-Util-FieldHash | 0 |
| amazon:2023 | perl-Text-Abbrev | 0 |
| amazon:2023 | perl-libnetcfg | 0 |
| amazon:2023 | perl-Thread | 0 |
| amazon:2023 | perl-sigtrap | 0 |
| amazon:2 | perl-libs | 0 |
| amazon:2023 | perl-Opcode | 0 |
| amazon:2023 | perl-debugger | 0 |
| amazon:2023 | perl-Devel-SelfStubber | 0 |
| amazon:2023 | perl-Tie-File | 0 |
| amazon:2023 | perl-File-stat | 0 |
| amazon:2023 | perl-vars | 0 |
| amazon:2023 | perl-SelectSaver | 0 |
…and 104 more
Timeline
- May 30, 2025 CVE Published
- May 31, 2025 EPSS Score (30 in total, the first dated here)
- Mar 17, 2026 Security Advisory (59 in total, the first dated here)
- Apr 14, 2026 Distribution Patch (55 in total, the first dated here)
- Apr 18, 2026 CVE Updated
- Jun 8, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40909
vulnetix vdb fixes CVE-2025-40909
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40909/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- patch
- mailing-listexploit
- issue-tracking
- related
- related
- related
- related
- 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://seclists.org/fulldisclosure/2025/Sep/53 url
- https://lists.debian.org/debian-lts-announce/2026/04/msg00018.html advisory
- 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