BreachSpiderVerified, not vibes

CVE-2025-40909 in Perl

Medium 5.9

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) thre...

Affects 1 product from 2 vendors. Facts below cite their sources.

CVSS 3.15.9
EPSS0.2%
EPSS percentile9th
FixUnknown

Requires local access, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component.

Affected products and versions

VendorProductAffected versions
Perl Perl ≥ 5.13.6, < 5.41.13
Target — —

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2025-40909
BreachSpider IDBS-2025-GLOBAL-039248-M
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Published2025-05-30
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-426: CWE-426

CWE-689: CWE-689

Related attack patterns (CAPEC)

CAPEC-27 Leveraging Race Conditions via Symbolic Links via CWE-689

CAPEC-38 Leveraging/Manipulating Configuration File Search Paths via CWE-426

CAPEC-26 Leveraging Race Conditions via CWE-689

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

Perl threads have a working directory race condition that can lead to file operations targeting unintended paths, potentially allowing unintended code execution.

The vulnerability arises when a directory handle is open at thread creation, causing the process-wide current working directory to be temporarily changed to clone that handle. This change is visible to other threads, which can lead to unintended file operations.

Questions

What is CVE-2025-40909?

Perl threads have a working directory race condition that can lead to file operations targeting unintended paths, potentially allowing unintended code execution.

What is the CVSS score for CVE-2025-40909?

CVE-2025-40909 has CVSS 5.9 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L. EPSS: 0.2%.

Is CVE-2025-40909 actively exploited?

No confirmed active exploitation of CVE-2025-40909 as of 2026-09-25.

How do I remediate CVE-2025-40909?

Priority: MEDIUM.

What systems are affected by CVE-2025-40909?

CVE-2025-40909 affects Perl Perl; Target.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Perl","product":"Perl","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.