GHSA-4f8h-vr72-p32c: virtualenv: Temporary app-data can leave dangling seed package links
- Source:
- OSV.dev
- Published:
- Fetched:
- Updated:
- Affects:
- virtualenv
https://osv.dev/vulnerability/GHSA-4f8h-vr72-p32c ↗
virtualenv: Temporary app-data can leave dangling seed package links ## Summary The app-data seeder can leave an environment linked to temporary package files that virtualenv deletes when creation finishes. The environment-variable and configuration-file forms of `symlink_app_data` can enable this state even though the command-line flag is disabled for temporary app-data. The resulting environment depends on a cache pathname that its owner no longer controls. Anthropic's OSS Scanner reported this as `ANT-2026-ZOE2GEPC` in `virtualenv-20261015-005`, received on 15 October 2026. This draft records source review and functional remediation checks. The reporter's cross-account code-execution claim has not been independently reproduced. ## Affected area Integrity of app-data references after temporary cache cleanup. ## Attacker-controlled input Symlink seeding must be enabled through `VIRTUALENV_SYMLINK_APP_DATA` or `symlink_app_data` in the configuration file, and app-data setup must fall back to a temporary directory. A missing or unwritable configured cache can cause that fallback. Ordinary copy seeding does not leave these references. The security concern requires a shared temporary-directory parent where another account can acquire the deleted cache pathname, followed by use of the affected environment. That account need not already be able to modify the environment or the private cache while it exists. This differs from the security policy's excluded case of an account that already controls live app-data contents. On a platform with a temporary-directory parent private to the environment owner, that cross-account condition is absent. Windows functional checks do not establish cross-account exposure under Windows defaults. ## Affected code The relevant 21.14.8 source is in [symlink seeder](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/seed/embed/via_app_data/via_app_data.py), [temporary cache cleanup](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/app_data/via_tempdir.py). ## Mechanism When app-data setup falls back to a temporary directory, the command-line `--symlink-app-data` action is disabled. A value supplied by `VIRTUALENV_SYMLINK_APP_DATA` or `virtualenv.ini` can still become the parser default, and the seeder constructor accepts that value without rechecking the cache lifetime. It links `site-packages/pip` into the temporary cache. Session cleanup deletes that cache, leaving a dangling link whose pathname can later be claimed by another account on a shared temporary filesystem. ## Reproduction and evidence The scanner ran its reproduction as two unprivileged users, with root used only to switch identities. The environment owner had an unwritable home, so app-data fell back to `/tmp`. The control used the command-line flag and received a real pip directory. With `VIRTUALENV_SYMLINK_APP_DATA=1`, the new environment instead contained a `pip` link into a deleted `/tmp/tmpXXXXXXXX` directory. A second Affected: PyPI:virtualenv Fixed in: 21.14.10 References: https://github.com/pypa/virtualenv/security/advisories/GHSA-4f8h-vr72-p32c https://nvd.nist.gov/vuln/detail/CVE-2026-113713 https://github.com/pypa/virtualenv/pull/3437 https://github.com/pypa/virtualenv/commit/b81995c3feab9e1edb453c75ffc6616e1a77335e https://github.com/pypa/virtualenv https://github.com/pypa/virtualenv/releases/tag/21.14.10