Skip to main content
CVE-2026-102938VulnerabilityPublished Updated

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

Affects poetrySource GCVE Database

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

Not known to be exploited · CVSS 5.8 Medium : upgrade to 2.5.0 or 1.2.2_1 when convenient.

Data as of 30 Oct 2026, 08:30 UTC

CVSS 4.0 base score
5.8Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.5.0, 1.2.2_1
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 29 Oct 2026.

What to do

Upgrade poetry to 2.5.0 or 1.2.2_1.

Affected software

ProductAffectedFixed in
Homebrewpoetrypkg:brew/poetryOther threatsAffected
  • >=1.1.0 <1.2.2_1
  • >=1.8.0 <2.5.0
Fixed in
  • 1.2.2_1
  • 2.5.0

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 patches by upgrading Poetry to version 1.2.2_1 or later, or 2.5.0 or later, where the issue is fixed by sanitizing line boundaries in prompt values. As a workaround, avoid passing externally influenced data as the virtualenv prompt and strip any line boundary characters from values used with --prompt or VIRTUALENV_PROMPT.

Description

A vulnerability in Poetry's virtualenv handling allows crafted prompt values containing line boundaries to inject additional configuration lines into the pyvenv.cfg file. This can overwrite critical configuration keys such as 'home', which tooling uses to locate the base interpreter. The issue arises because pyvenv.cfg is line-based with no escape syntax, and the write operation did not sanitize line boundaries, allowing injection of arbitrary config lines. This can lead to configuration corruption or redirection of interpreter paths when the prompt value is influenced by external input such as CI job templates or environment variables. Fixed in Poetry versions 1.2.2_1 and 2.5.0 by collapsing line boundaries to spaces during serialization.

References

Community reviews

Loading reviews…