# CVE-2026-113724: virtualenv safe_delete symlink mode change vulnerability

Source: https://junglewise.ai/threats/cve-2026-113724-virtualenv-is-a-tool-for-creating-isolated-virtual-python  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-20. Updated: 2026-10-20  
License: CC BY 4.0 with a link back

CVE-2026-113724 · Severity: medium · CVSS 4.5 · Published 2026-10-20

virtualenv is a Python tool that creates isolated environments for running different Python versions and packages. A flaw in its cleanup code allows an attacker to change file permissions on files outside the intended directory by planting a symlink. This could enable an unauthorized user to make a victim's file writable if they can traverse the parent directories.

Technologies: [Pypa Virtualenv](https://junglewise.ai/threats/technologies/pypa-virtualenv), [virtualenv (PyPI)](https://junglewise.ai/threats/technologies/virtualenv). Vendors: [Pypa](https://junglewise.ai/threats/vendors/pypa), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-113724 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-113724 being exploited in the wild.

**How severe is CVE-2026-113724?** Medium severity, with a CVSS score of 4.5, published 20 October 2026.

**Which products and versions are affected?** Pypa Virtualenv before 21.14.9; virtualenv (PyPI) < 21.14.9, ECOSYSTEM:introduced=0,fixed=21.14.9.

**Is there a fix for CVE-2026-113724?** Yes. virtualenv (PyPI): upgrade to 21.14.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-113724 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-113724?** Check whether you run Pypa Virtualenv or virtualenv (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- virtualenv (PyPI): upgrade to 21.14.9 or later

  ```sh
  pip install "virtualenv>=21.14.9"
  ```


## Technical details

The safe_delete() error handler in virtualenv prior to 21.14.9 follows symlinks when applying permissions via os.chmod(path, ...) after a failed file removal. An attacker who can create a symlink in a read-only directory can cause the handler to modify the mode bits of a user-owned target file outside the intended deletion path to 0777, making it broadly writable. This requires the attacking user to have directory traversal permissions but does not require root access or reading the target.

## Affected products

- pypa virtualenv before 21.14.9

## Identifiers

- CVE-2026-113724
- GHSA-43mp-35q3-x3fq

## Timeline

- 2026-10-20: disclosed
- 2026-10-17: patched

## References

- [https://github.com/pypa/virtualenv/commit/2bfdc0230d1b2685fedfcfe66c835b9a2ec7c440](https://github.com/pypa/virtualenv/commit/2bfdc0230d1b2685fedfcfe66c835b9a2ec7c440)
- [https://github.com/pypa/virtualenv/pull/3427](https://github.com/pypa/virtualenv/pull/3427)

## Related threats

- [virtualenv bash activate command injection via unescaped prompt](https://junglewise.ai/threats/cve-2026-115586-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv command injection in activation script template substitution](https://junglewise.ai/threats/cve-2026-113776-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv command injection in Fish shell activation script](https://junglewise.ai/threats/cve-2026-113732-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [pypa virtualenv command injection in bash activate script](https://junglewise.ai/threats/cve-2026-113726-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv bash activate script command injection in PS1](https://junglewise.ai/threats/cve-2026-113725-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
