VDB

CVE-2025-40909

CVE-2025-40909 PUBLISHED CVSS 5.9 MEDIUM

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.

PackageEcosystemFixed in
perl-Unicode-Collate-debuginfoerrata.rockylinux.org0: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_Filtererrata.rockylinux.org0:0.06-474.module+el8.10.0+40155+64ce2d41.noarch
perl-Unicode-Collate-debugsourceerrata.rockylinux.org0:1.29-1.module+el8.10.0+40155+64ce2d41.aarch64, 0:1.29-1.module+el8.10.0+1616+0d20cc68.aarch64
perlcpan.org5.41.13
perl-threads-shared-debuginfoerrata.rockylinux.org0: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-Localeerrata.rockylinux.org0: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-Collateerrata.rockylinux.org0: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-macroserrata.rockylinux.org4:5.32.1-474.module+el8.10.0+40155+64ce2d41.noarch
perl-interpretererrata.rockylinux.org4:5.32.1-474.module+el8.10.0+40155+64ce2d41.x86_64
perl-ExtUtils-Miniperlerrata.rockylinux.org0:1.09-474.module+el8.10.0+40155+64ce2d41.noarch
perl-Carperrata.rockylinux.org0: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-FileHandleerrata.rockylinux.org0:2.03-474.module+el8.10.0+40155+64ce2d41.noarch

85 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
5.9
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Affected products

VendorProductVersions
perlperl5.13.6
perlperl5.13.6
amazon:2perl-Pod-Escapes0
amazon:2023perl-overloading0
amazon:2023perl-Locale-Maketext-Simple0
amazon:2023perl-meta-notation0
amazon:2023perl-File-DosGlob0
amazon:2023perl-Hash-Util-FieldHash0
amazon:2023perl-Text-Abbrev0
amazon:2023perl-libnetcfg0
amazon:2023perl-Thread0
amazon:2023perl-sigtrap0
amazon:2perl-libs0
amazon:2023perl-Opcode0
amazon:2023perl-debugger0
amazon:2023perl-Devel-SelfStubber0
amazon:2023perl-Tie-File0
amazon:2023perl-File-stat0
amazon:2023perl-vars0
amazon:2023perl-SelectSaver0

…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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›