{"id":"UBUNTU-CVE-2025-40909","details":"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","modified":"2026-04-22T19:49:36.906432Z","published":"2025-05-30T13:15:00Z","related":["USN-7678-1"],"upstream":["CVE-2025-40909"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-40909"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-40909"},{"type":"REPORT","url":"https://lists.security.metacpan.org/cve-announce/msg/30017499/"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-7678-1"}],"affected":[{"package":{"name":"perl","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/perl@5.18.2-2ubuntu1.7+esm5?arch=source&distro=esm-infra-legacy/trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.14.2-21build1","5.18.1-4","5.18.1-4build1","5.18.1-5","5.18.2-2","5.18.2-2ubuntu1","5.18.2-2ubuntu1.1","5.18.2-2ubuntu1.3","5.18.2-2ubuntu1.4","5.18.2-2ubuntu1.6","5.18.2-2ubuntu1.7","5.18.2-2ubuntu1.7+esm3","5.18.2-2ubuntu1.7+esm4","5.18.2-2ubuntu1.7+esm5"],"ecosystem_specific":{"binaries":[{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"libcgi-fast-perl"},{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"libperl5.18"},{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"perl"},{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"perl-base"},{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"perl-debug"},{"binary_version":"5.18.2-2ubuntu1.7+esm5","binary_name":"perl-modules"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/perl@5.22.1-9ubuntu0.9+esm2?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.20.2-6","5.22.1-3","5.22.1-4","5.22.1-5","5.22.1-7","5.22.1-8","5.22.1-9","5.22.1-9ubuntu0.2","5.22.1-9ubuntu0.3","5.22.1-9ubuntu0.5","5.22.1-9ubuntu0.6","5.22.1-9ubuntu0.9","5.22.1-9ubuntu0.9+esm1","5.22.1-9ubuntu0.9+esm2"],"ecosystem_specific":{"binaries":[{"binary_version":"5.22.1-9ubuntu0.9+esm2","binary_name":"libperl5.22"},{"binary_version":"5.22.1-9ubuntu0.9+esm2","binary_name":"perl"},{"binary_version":"5.22.1-9ubuntu0.9+esm2","binary_name":"perl-base"},{"binary_version":"5.22.1-9ubuntu0.9+esm2","binary_name":"perl-debug"},{"binary_version":"5.22.1-9ubuntu0.9+esm2","binary_name":"perl-modules-5.22"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/perl@5.26.1-6ubuntu0.7?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.26.0-8ubuntu1","5.26.1-2ubuntu1","5.26.1-3","5.26.1-4","5.26.1-4build1","5.26.1-5","5.26.1-6","5.26.1-6ubuntu0.1","5.26.1-6ubuntu0.2","5.26.1-6ubuntu0.3","5.26.1-6ubuntu0.5","5.26.1-6ubuntu0.6","5.26.1-6ubuntu0.7"],"ecosystem_specific":{"binaries":[{"binary_version":"5.26.1-6ubuntu0.7","binary_name":"libperl5.26"},{"binary_version":"5.26.1-6ubuntu0.7","binary_name":"perl"},{"binary_version":"5.26.1-6ubuntu0.7","binary_name":"perl-base"},{"binary_version":"5.26.1-6ubuntu0.7","binary_name":"perl-debug"},{"binary_version":"5.26.1-6ubuntu0.7","binary_name":"perl-modules-5.26"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/perl@5.30.0-9ubuntu0.5?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.28.1-6build1","5.30.0-7","5.30.0-9","5.30.0-9build1","5.30.0-9ubuntu0.2","5.30.0-9ubuntu0.3","5.30.0-9ubuntu0.4","5.30.0-9ubuntu0.5"],"ecosystem_specific":{"binaries":[{"binary_version":"5.30.0-9ubuntu0.5","binary_name":"libperl5.30"},{"binary_version":"5.30.0-9ubuntu0.5","binary_name":"perl"},{"binary_version":"5.30.0-9ubuntu0.5","binary_name":"perl-base"},{"binary_version":"5.30.0-9ubuntu0.5","binary_name":"perl-debug"},{"binary_version":"5.30.0-9ubuntu0.5","binary_name":"perl-modules-5.30"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/perl@5.34.0-3ubuntu1.5?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.34.0-3ubuntu1.5"}]}],"versions":["5.32.1-3ubuntu3","5.34.0-3ubuntu1","5.34.0-3ubuntu1.1","5.34.0-3ubuntu1.2","5.34.0-3ubuntu1.3","5.34.0-3ubuntu1.4"],"ecosystem_specific":{"binaries":[{"binary_version":"5.34.0-3ubuntu1.5","binary_name":"libperl5.34"},{"binary_version":"5.34.0-3ubuntu1.5","binary_name":"perl"},{"binary_version":"5.34.0-3ubuntu1.5","binary_name":"perl-base"},{"binary_version":"5.34.0-3ubuntu1.5","binary_name":"perl-debug"},{"binary_version":"5.34.0-3ubuntu1.5","binary_name":"perl-modules-5.34"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/perl@5.38.2-3.2ubuntu0.2?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.38.2-3.2ubuntu0.2"}]}],"versions":["5.36.0-9ubuntu1","5.36.0-10ubuntu1","5.38.2-3","5.38.2-3.2","5.38.2-3.2build1","5.38.2-3.2build2","5.38.2-3.2build2.1","5.38.2-3.2ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_version":"5.38.2-3.2ubuntu0.2","binary_name":"libperl5.38t64"},{"binary_version":"5.38.2-3.2ubuntu0.2","binary_name":"perl"},{"binary_version":"5.38.2-3.2ubuntu0.2","binary_name":"perl-base"},{"binary_version":"5.38.2-3.2ubuntu0.2","binary_name":"perl-debug"},{"binary_version":"5.38.2-3.2ubuntu0.2","binary_name":"perl-modules-5.38"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-40909.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"},{"type":"Ubuntu","score":"medium"}]}