Conda lock: virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration
Affects conda-lockSource GCVE Database
Not known to be exploited · CVSS 5.8 Medium : upgrade to 4.1.0 when convenient.
Data as of 4 Dec 2026, 20:31 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 5.8 |
|---|
- Patch
- Available – fixed in 4.1.0, 21.7.11
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Sep 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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 4 Dec 2026.
What to do
Upgrade conda-lock to 4.1.0; virtualenv to 21.7.11.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewconda-lockpkg:brew/conda-lockOther threats | Affected
| Fixed in
|
PyPIvirtualenvpkg:pypi/virtualenvOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in conda-lock version 4.1.0 that sanitizes line boundaries in prompt values by collapsing them to spaces before writing pyvenv.cfg, preventing injection of additional configuration lines. Until upgrading, users should avoid passing externally influenced data as the virtualenv prompt and strip any line boundary characters from prompt values supplied via --prompt or the VIRTUALENV_PROMPT environment variable.
Description
A vulnerability in conda-lock's virtualenv handling allows crafted prompt values containing line boundaries to inject additional configuration lines into the pyvenv.cfg file. This can cause keys such as '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 without escape syntax, and the write method did not sanitize line boundaries in prompt values. The vulnerability affects versions from 2.5.5 up to but not including 4.1.0 and has been fixed in version 4.1.0.
References
- github.com/pypa/virtualenv/security/advisories/GHSA-9h9j-4vrj-gf7g (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-102938 (opens in a new tab)
- github.com/pypa/virtualenv/pull/3247 (opens in a new tab)
- github.com/pypa/virtualenv/commit/a30f995461043acb6cacbf3a890951563ccf7140 (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2026-4012.yaml (opens in a new tab)
- github.com/pypa/virtualenv (opens in a new tab)
- github.com/pypa/virtualenv/releases/tag/21.7.11 (opens in a new tab)
- pypi.org/project/virtualenv (opens in a new tab)