CVE-2025-40909: Perl threads have a working directory race condition where file operations may target unintended paths
Affects perlSource GCVE Database
Not known to be exploited · CVSS 5.9 Medium · fixed in 5.34.0-3ubuntu1.5 : update perl when convenient.
Data as of 24 Nov 2026, 21:15 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.34.0-3ubuntu1.5, 5.38.2-3.2ubuntu0.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:LExploitation evidence
Disclosed: evidence found.
CVE published 30 May 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Upgrade the Ubuntu perl to 5.34.0-3ubuntu1.5 (package) or 5.38.2-3.2ubuntu0.2 (package).
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 22.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=jammyOther threats | Affected
| Fixed in
|
Ubuntu Pro 20.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra/focalOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra/bionicOther threats | Affected
| Fixed in– |
Ubuntu Pro 16.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra-legacy/xenialOther threats | Affected
| Fixed in– |
Ubuntu Pro 14.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra-legacy/trustyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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