{"vuln_id":"GHSA-hhxq-47xx-j5xx","aliases":["CVE-2026-113719"],"description":"virtualenv: Seed replacement does not contain metadata deletion paths","published_at":"2026-10-20T20:17:18.347000Z","modified_at":"2026-11-18T12:11:06.983073Z","first_seen_at":"2026-11-21T19:15:47.063575Z","severity":"medium","severity_source":"native","cvss_score":4.5,"cvss_vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","cwe":["CWE-22"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-hhxq-47xx-j5xx"},"matched_alias":null,"items":[{"id":10741,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-hhxq-47xx-j5xx: virtualenv: Seed replacement does not contain metadata deletion paths","summary":"virtualenv: Seed replacement does not contain metadata deletion paths\n\n## Summary\n\nThe app-data seeder joins paths from existing distribution metadata to site-packages and deletes the resulting paths\nwithout checking containment within the environment.\n\nAnthropic's OSS Scanner reported this as `ANT-2026-SXOEHWP7` in `virtualenv-20261015-005`, received on 15 October 2026.\n\n## Affected area\n\nRemoval of a previously installed seed package.\n\n## Attacker-controlled input\n\nAn environment being reused must contain distribution metadata influenced by another account. The invoking user must\nhave deletion rights over the paths named by that metadata. Installing a new environment without existing package\nmetadata does not enter this cleanup path.\n\n## Affected code\n\nThe relevant 21.14.8 source is in\n[seed uninstall](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/seed/embed/via_app_data/pip_install/base.py).\n\n## Mechanism\n\nBefore reinstalling a seed wheel, `PipInstall._uninstall_previous_version()` accepts an existing `pip-*.dist-info`\ndirectory in the destination. `_uninstall_dist()` reads its `top_level.txt` and `RECORD`, joins each entry to\n`site-packages`, and deletes the result. It does not check whether `..`, an absolute entry, or a linked parent takes the\npath outside the environment. The default app-data seeder reaches this path when it reuses a tree containing\nseed-package metadata; `--clear` removes that tree first.\n\n## Reproduction and evidence\n\nThe scanner prepared a project with `.venv/lib/python3.14/site-packages/pip-1.0.dist-info/`. Its `top_level.txt`\ncontained `../../../../../Documents`; its `RECORD` named `../../../../../notes.txt,,`. The user's home initially held\n`Documents/thesis/chapter1.txt` and `notes.txt`. Running `virtualenv .venv` exited successfully but removed both paths.\nA control tree with `top_level.txt` set to `pip` and a normal `pip/__init__.py` RECORD entry left the home files in\nplace. The reproducer prints `BUG` only when the control files survive and both attack targets disappear.\n\nThe deletion uses the invoking user's permissions and runs during creation, before any use of the environment. It\nrequires an existing destination that another account could populate; a fresh empty environment does not supply hostile\nmetadata. The report traces this cleanup to #2186, first released in 20.8.1.\n[PR #3428](https://github.com/pypa/virtualenv/pull/3428) checks each deletion path against the resolved environment root\nand refuses to delete the root itself.\n\n## Attack sequence\n\n```mermaid\nsequenceDiagram\n    participant A as Prepared .venv metadata\n    participant V as App-data seeder\n    participant P as site-packages\n    participant H as User home\n    A->>P: top_level.txt names ../../../../../Documents\n    A->>P: RECORD names ../../../../../notes.txt\n    V->>P: read pip-1.0.dist-info before reinstall\n    P->>H: join entries without containment check\n    V->>H: remove Documents and notes.txt\n    V-->>A: virtualenv exits successfully\n```\n\n## Reproducer file\n\nAffected: PyPI:virtualenv\n\nFixed in: 21.14.9\n\nReferences:\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-hhxq-47xx-j5xx\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-113719\nhttps://github.com/pypa/virtualenv/pull/3428\nhttps://github.com/pypa/virtualenv/commit/e3cea6fa10a50fa29cf1fdddd772458fba076d5f\nhttps://github.com/pypa/virtualenv\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9","url":"https://osv.dev/vulnerability/GHSA-hhxq-47xx-j5xx","published_at":"2026-10-23T22:19:15Z","updated_at":"2026-11-18T12:11:06.983073Z","fetched_at":"2026-11-21T19:15:55.946143Z","severity":"medium","cvss_score":4.5,"epss":0.00196,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"virtualenv","vuln_id":"CVE-2026-113719","vuln_ids":["CVE-2026-113719","BIT-VIRTUALENV-2026-113719","GHSA-HHXQ-47XX-J5XX","PYSEC-2026-4378"],"tags":["osv","pypi","fix-available"],"cluster_id":4101,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10741","html":"https://vulnwatch.ve1ve2.com/item/10741"}},{"id":10742,"source":{"id":"osv","name":"OSV.dev"},"title":"PYSEC-2026-4378: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-packag…","summary":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-package metadata and _uninstall_dist() joins entries from top_level.txt and RECORD to site-packages without checking containment. When a reused destination contains distribution metadata influenced by another account, relative traversal, absolute entries, or linked parents can cause app-data reseeding to delete files outside the environment or the environment root with the invoking user's permissions, provided that user has deletion rights over the named paths. The deletion occurs during environment creation before any later use of the environment. Fresh environments without existing package metadata and creation with --clear do not enter this cleanup path. This issue is fixed in version 21.14.9.\n\nAffected: PyPI:virtualenv\n\nFixed in: 21.14.9\n\nReferences:\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9\nhttps://github.com/pypa/virtualenv/commit/e3cea6fa10a50fa29cf1fdddd772458fba076d5f\nhttps://github.com/pypa/virtualenv/pull/3428\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-hhxq-47xx-j5xx","url":"https://osv.dev/vulnerability/PYSEC-2026-4378","published_at":"2026-10-20T20:17:18.347000Z","updated_at":"2026-11-18T12:11:06.983073Z","fetched_at":"2026-11-21T19:15:55.946144Z","severity":"medium","cvss_score":4.5,"epss":0.00196,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"virtualenv","vuln_id":"CVE-2026-113719","vuln_ids":["CVE-2026-113719","BIT-VIRTUALENV-2026-113719","GHSA-HHXQ-47XX-J5XX","PYSEC-2026-4378"],"tags":["osv","pypi","fix-available"],"cluster_id":4100,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10742","html":"https://vulnwatch.ve1ve2.com/item/10742"}},{"id":3763,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-113719: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-packag…","summary":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-package metadata and _uninstall_dist() joins entries from top_level.txt and RECORD to site-packages without checking containment. When a reused destination contains distribution metadata influenced by another account, relative traversal, absolute entries, or linked parents can cause app-data reseeding to delete files outside the environment or the environment root with the invoking user's permissions, provided that user has deletion rights over the named paths. The deletion occurs during environment creation before any later use of the environment. Fresh environments without existing package metadata and creation with --clear do not enter this cleanup path. This issue is fixed in version 21.14.9.\n\nReferences:\nhttps://github.com/pypa/virtualenv/commit/e3cea6fa10a50fa29cf1fdddd772458fba076d5f\nhttps://github.com/pypa/virtualenv/pull/3428\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-hhxq-47xx-j5xx\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-hhxq-47xx-j5xx","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113719","published_at":"2026-10-20T20:17:18.347000Z","updated_at":"2026-11-17T20:26:10.373000Z","fetched_at":"2026-11-21T19:15:31.479288Z","severity":"medium","cvss_score":4.5,"epss":0.00196,"is_kev":false,"has_exploit":true,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-113719","vuln_ids":["CVE-2026-113719","GHSA-HHXQ-47XX-J5XX"],"tags":["CWE-22"],"cluster_id":4100,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/3763","html":"https://vulnwatch.ve1ve2.com/item/3763"}}]}