Impact
The vulnerability arises from the virtualenv built‑in creator calling ensure_dir() for the executable, library, and package directories. Since ensure_dir() accepts an existing symlink to a directory because the existence check follows symlinks, the creator can write interpreter executables, seed packages, and activation scripts through the symlink into the parent directory outside the requested virtual environment. The tool does not allow an attacker to control the exact output bytes, but it can overwrite or create files in the parent path, potentially affecting system‑wide or other users’ files and leading to integrity or privilege‑escalation problems.
Affected Systems
The flaw affects any installation of the PyPA virtualenv package older than 21.14.9 on systems where a writable symlink points to a directory owned by another local account. Users invoking virtualenv on such systems are at risk because the built‑in creator may escape the intended environment and write files outside the target directory.
Risk and Exploitability
The CVSS score of 4.5 classifies this as a moderate‑severity vulnerability. No EPSS score is published, and it is not listed in the CISA KEV catalog. The attack is local: it requires the attacker to have write permissions to a symlink that points to another user’s existing directory tree. Because arbitrary output bytes cannot be chosen, the flaw does not provide code execution, but it allows overwriting or deleting files outside the virtual environment, which could lead to unintended system state changes or privilege escalation in shared environments.
OpenCVE Enrichment
Github GHSA