{"answers":{"affected":"","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-40909 exists.","fix":"Apply the vendor's patch.","what":"CVE-2025-40909 is a medium-severity vulnerability in perl, published on 30 May 2025. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-40909 and fix it if it is affected.\n\nWhat it is: CVE-2025-40909 is a medium-severity vulnerability in perl, published on 30 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-40909 exists.\n\nAffected product: perl. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-40909/ (Markdown: https://insights.sbomify.com/CVE-2025-40909/index.md)","id":"CVE-2025-40909","markdown":"https://insights.sbomify.com/CVE-2025-40909/index.md","name":"CVE-2025-40909","record":{"aliases":["ALSA-2025:11805","ALSA-2026:8096","AZL-62067","AZL-62069","BELL-CVE-2025-40909","CLSA-2025-1755270634","CLSA-2025-1755270847","CLSA-2025-1755513271","DEBIAN-CVE-2025-40909","ECHO-5693-3efb-b660","GHSA-jpf5-526x-c5hw","MINI-459h-j68x-8hp4","MINI-f2gm-5xq6-49fx","MINI-wwfx-85jf-frcx","OESA-2025-1631","RHSA-2025:11545","RHSA-2025:11804","RHSA-2025:11805","RHSA-2025:12056","RHSA-2026:37070","RHSA-2026:8096","RLSA-2025:11804","RLSA-2025:11805","RLSA-2025:12056","RLSA-2026:8096","ROOT-OS-DEBIAN-11-CVE-2025-40909","SUSE-SU-2025:02027-1","SUSE-SU-2025:02051-1","SUSE-SU-2025:20456-1","UBUNTU-CVE-2025-40909","USN-7678-1","openSUSE-SU-2025:15258-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Perl programming language","requires_auth":"none","summary":"A local attacker can exploit a race condition in Perl threads to execute code or read files from unintended paths.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"CPANSec","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-689","name":"Permission Race Condition During Resource Copy"},{"id":"CWE-426","name":"Untrusted Search Path"}],"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","ecosystems":["AlmaLinux:8","Red Hat:enterprise_linux:10.0","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:9::appstream","Red Hat:rhel_aus:8.6::appstream","Red Hat:rhel_eus:9.4::appstream","Red Hat:rhel_eus_long_life:8.6::appstream","Rocky Linux:10","Rocky Linux:8","Rocky Linux:9","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Micro 5.3","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Micro 5.5","SUSE:Linux Enterprise Module for Basesystem 15 SP6","SUSE:Linux Enterprise Module for Basesystem 15 SP7","SUSE:Linux Enterprise Module for Development Tools 15 SP6","SUSE:Linux Enterprise Module for Development Tools 15 SP7","SUSE:Linux Enterprise Module for Package Hub 15 SP6","SUSE:Linux Enterprise Module for Package Hub 15 SP7","SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5","SUSE:Linux Micro 6.0","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Perl threads have a working directory race condition where file operations may target unintended paths","id":"CVE-2025-40909","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"race_condition","year":"2025"},"n_packages":1782,"n_references":7,"next":{"headline":"Net::IP::LPM version 1.10 for Perl does not properly consider leading zero characters in IP CIDR address strings, which could allow attacker","id":"CVE-2025-40910"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["4:5.26.3-423.el8_10"],"introduced":["0"],"last_affected":[],"package":"perl","purl":"pkg:rpm/almalinux/perl","source":"ALSA-2025:11805"},{"ecosystem":"AlmaLinux:8","fixed":["4:5.32.1-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl","purl":"pkg:rpm/almalinux/perl","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.1903-10.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Algorithm-Diff","purl":"pkg:rpm/almalinux/perl-Algorithm-Diff","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.38-3.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Archive-Tar","purl":"pkg:rpm/almalinux/perl-Archive-Tar","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.68-3.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Archive-Zip","purl":"pkg:rpm/almalinux/perl-Archive-Zip","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.99-423.el8_10"],"introduced":["0"],"last_affected":[],"package":"perl-Attribute-Handlers","purl":"pkg:rpm/almalinux/perl-Attribute-Handlers","source":"ALSA-2025:11805"},{"ecosystem":"AlmaLinux:8","fixed":["1.01-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Attribute-Handlers","purl":"pkg:rpm/almalinux/perl-Attribute-Handlers","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["5.74-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-AutoLoader","purl":"pkg:rpm/almalinux/perl-AutoLoader","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["5.74-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-AutoSplit","purl":"pkg:rpm/almalinux/perl-AutoSplit","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.80-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-B","purl":"pkg:rpm/almalinux/perl-B","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.23-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Benchmark","purl":"pkg:rpm/almalinux/perl-Benchmark","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.28-5.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-CPAN","purl":"pkg:rpm/almalinux/perl-CPAN","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.12-13.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-CPAN-DistnameInfo","purl":"pkg:rpm/almalinux/perl-CPAN-DistnameInfo","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.150010-397.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-CPAN-Meta","purl":"pkg:rpm/almalinux/perl-CPAN-Meta","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.140-397.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-CPAN-Meta-Requirements","purl":"pkg:rpm/almalinux/perl-CPAN-Meta-Requirements","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.018-1001.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-CPAN-Meta-YAML","purl":"pkg:rpm/almalinux/perl-CPAN-Meta-YAML","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.50-439.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Carp","purl":"pkg:rpm/almalinux/perl-Carp","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.66-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Class-Struct","purl":"pkg:rpm/almalinux/perl-Class-Struct","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.28-2.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Bzip2","purl":"pkg:rpm/almalinux/perl-Compress-Bzip2","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.28-2.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Bzip2","purl":"pkg:rpm/almalinux/perl-Compress-Bzip2","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.096-1.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Raw-Bzip2","purl":"pkg:rpm/almalinux/perl-Compress-Raw-Bzip2","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.096-1.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Raw-Bzip2","purl":"pkg:rpm/almalinux/perl-Compress-Raw-Bzip2","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.096-1.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Raw-Lzma","purl":"pkg:rpm/almalinux/perl-Compress-Raw-Lzma","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.096-1.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Raw-Lzma","purl":"pkg:rpm/almalinux/perl-Compress-Raw-Lzma","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.096-2.module_el8.10.0+3779+d5938d28"],"introduced":["0"],"last_affected":[],"package":"perl-Compress-Raw-Zlib","purl":"pkg:rpm/almalinux/perl-Compress-Raw-Zlib","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.03-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Config-Extensions","purl":"pkg:rpm/almalinux/perl-Config-Extensions","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.32-441.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Config-Perl-V","purl":"pkg:rpm/almalinux/perl-Config-Perl-V","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.06-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-DBM_Filter","purl":"pkg:rpm/almalinux/perl-DBM_Filter","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.855-1.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-DB_File","purl":"pkg:rpm/almalinux/perl-DB_File","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.855-1.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-DB_File","purl":"pkg:rpm/almalinux/perl-DB_File","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.174-440.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Data-Dumper","purl":"pkg:rpm/almalinux/perl-Data-Dumper","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["2.174-440.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-Data-Dumper","purl":"pkg:rpm/almalinux/perl-Data-Dumper","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.110-7.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Data-OptList","purl":"pkg:rpm/almalinux/perl-Data-OptList","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["0.200007-8.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Data-Section","purl":"pkg:rpm/almalinux/perl-Data-Section","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["3.62-1.module_el8.6.0+2766+8bf0b7ce"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-PPPort","purl":"pkg:rpm/almalinux/perl-Devel-PPPort","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["3.62-1.module_el8.6.0+3181+91434291"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-PPPort","purl":"pkg:rpm/almalinux/perl-Devel-PPPort","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.26-423.el8_10"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-Peek","purl":"pkg:rpm/almalinux/perl-Devel-Peek","source":"ALSA-2025:11805"},{"ecosystem":"AlmaLinux:8","fixed":["1.28-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-Peek","purl":"pkg:rpm/almalinux/perl-Devel-Peek","source":"ALSA-2026:8096"},{"ecosystem":"AlmaLinux:8","fixed":["1.06-423.el8_10"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-SelfStubber","purl":"pkg:rpm/almalinux/perl-Devel-SelfStubber","source":"ALSA-2025:11805"},{"ecosystem":"AlmaLinux:8","fixed":["1.06-474.module_el8.10.0+4162+0aac7c4c"],"introduced":["0"],"last_affected":[],"package":"perl-Devel-SelfStubber","purl":"pkg:rpm/almalinux/perl-Devel-SelfStubber","source":"ALSA-2026:8096"}],"prev":{"headline":"YAML-LibYAML prior to 0.903.0 for Perl uses 2-args open, allowing existing files to be modified","id":"CVE-2025-40908"},"products":["perl"],"published":"2025-05-30","related":[],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-18","vendors":["perl"]},"summary":"A local attacker can exploit a race condition in Perl threads to execute code or read files from unintended paths.","url":"https://insights.sbomify.com/CVE-2025-40909/"}