Skip to main content
VulnerabilityPublished Updated

CVE-2025-40909: Perl threads have a working directory race condition where file operations may target unintended paths

Affects perlSource GCVE Database

0
Compare
Authoritative record:CVE-2025-40909· Medium 5.9

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

CVSS 3.1 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.
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:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 May 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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).

Affected software

ProductAffectedFixed in
Ubuntu 24.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=nobleOther threatsAffected
  • <5.38.2-3.2ubuntu0.2
Fixed in
  • 5.38.2-3.2ubuntu0.2
Ubuntu 22.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=jammyOther threatsAffected
  • <5.34.0-3ubuntu1.5
Fixed in
  • 5.34.0-3ubuntu1.5
Ubuntu Pro 20.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra/focalOther threatsAffected
  • 5.28.1-6build1 – 5.30.0-9ubuntu0.5+esm5
12 affected builds
Fixed in–
Ubuntu Pro 18.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra/bionicOther threatsAffected
  • 5.26.0-8ubuntu1 – 5.26.1-6ubuntu0.7+esm5
17 affected builds
Fixed in–
Ubuntu Pro 16.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra-legacy/xenialOther threatsAffected
  • 5.20.2-6 – 5.22.1-9ubuntu0.9+esm5
17 affected builds
Fixed in–
Ubuntu Pro 14.04 LTSperlpkg:deb/ubuntu/perl?arch=source&distro=esm-infra-legacy/trustyOther threatsAffected
  • 5.14.2-21build1 – 5.18.2-2ubuntu1.7+esm10
18 affected builds
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

References

Community reviews

Loading reviews…