Skip to main content
CVE-2026-102938VulnerabilityPublished Updated

Pdm: virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration

Affects pdmSource GCVE Database

0
Compare
Authoritative record:CVE-2026-102938· Medium 5.8

Not known to be exploited · CVSS 5.8 Medium : upgrade to 2.29.2_1 or 2.9.3_2 when convenient.

Data as of 31 Oct 2026, 16:53 UTC

CVSS 4.0 base score
5.8Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.29.2_1, 2.9.3_2
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Sep 2026

  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 30 Oct 2026.

What to do

Upgrade pdm to 2.29.2_1 or 2.9.3_2.

Affected software

ProductAffectedFixed in
Homebrewpdmpkg:brew/pdmOther threatsAffected
  • >=2.0.0 <2.9.3_2
  • >=2.12.3 <2.29.2_1
Fixed in
  • 2.9.3_2
  • 2.29.2_1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Apply the official patch by upgrading to pdm versions 2.9.3_2 or 2.29.2_1 or later, where PyEnvCfg.write() sanitizes line boundaries in prompt values. As a workaround, avoid passing externally influenced data as the virtualenv prompt and strip any line boundary characters from prompt values before use. This prevents injection of additional configuration lines into pyvenv.cfg.

Description

A vulnerability in pdm's virtualenv handling allows crafted prompt values containing line boundary characters to inject additional configuration lines into the pyvenv.cfg file. This can cause keys like 'home' to be overwritten, potentially redirecting tooling that relies on this configuration to an attacker-controlled interpreter path. The issue arises because pyvenv.cfg is line-based with no escape syntax, and the write method did not sanitize line boundaries in prompt values. The vulnerability affects pdm versions >=2.0.0 <2.9.3_2 and >=2.12.3 <2.29.2_1 and has been fixed in versions 2.9.3_2 and 2.29.2_1.

References

Community reviews

Loading reviews…