Pypa virtualenv
virtualenv: Venv configuration readback can reinterpret path boundaries
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the stdlib venv creator reads generated pyvenv.cfg with str.splitlines() and merges parsed keys over virtualenv's selected configuration. An untrusted caller who influences the destination pathname can include a line-boundary character such as U+2028 to inject keys including home and include-system-site-packages, causing path data to change configuration structure before final output. Setting include-system-site-packages to true weakens environment isolation, while an altered home can change which standard-library files the interpreter loads if the attacker also controls that location. The builtin creator does not use this readback path. This issue is fixed in version 21.14.9.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 21.14.9
Fixed in 21.14.9
Mitigation
Upgrade virtualenv to 21.14.9 or later.
References
- Vendor advisory github.com/pypa/virtualenv/security/advisories…
- Patch github.com/pypa/virtualenv/pull/3426
- Patch github.com/pypa/virtualenv/commit/b0008a58885d…
1 more
- Release notes github.com/pypa/virtualenv/releases/tag/21.14.…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.