Impact
The vulnerability allows an attacker who can influence the destination pathname used by the standard library venv creator to inject special Unicode line‑boundary characters such as U+2028. These characters cause the creator to re‑parse the generated pyvenv.cfg file in a way that merges injected configuration keys, most notably home and include‑system‑site‑packages. If include‑system‑site‑packages is set to true, the environment loses isolation, allowing it to import system‑wide packages that were not intended to be available. If the attacker also controls the location pointed to by the home key, the interpreter may load altered standard‑library modules, potentially leading to arbitrary code execution. The impact materializes only when an untrusted caller can specify the pathname for the virtual environment, which is commonly a local operation.
Affected Systems
The affected product is Python virtualenv as distributed by PyPA. Versions prior to 21.14.9 are vulnerable. The fix was released with the 21.14.9 release, so any installation of virtualenv newer than or equal to that version is not affected.
Risk and Exploitability
The CVSS score of 2 rates the risk as low, but the exploitation requires local influence over the destination path and the ability to inject a Unicode line‑boundary. The EPSS score is not available, and the issue is not listed in the CISA KEV catalog, indicating that it has not been widely reported as exploited. However, environments that rely on strict isolation of virtual environments could be compromised if an attacker can set the working directory or supply the path used to create the environment. The primary attack vector is local, through manipulation of the pathname supplied when invoking virtualenv.
OpenCVE Enrichment
Github GHSA