Security fix · CVE-2026-113721
virtualenv is a tool for creating isolated virtual python environments.
Published Oct 20, 2026 · catalog updated Oct 22, 2026 · virtualenv is a tool
Last checked Nov 3, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-113721. EPSS is 0.14%. Act only if a listed version of virtualenv is a tool is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (virtualenv is a tool).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Medium4.5
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.14%
- Remediation
- Version ranges on file
- Affected products
- PyPI virtualenv · pip virtualenv · pypi virtualenv
## Summary Generated activation files and pyvenv.cfg can follow existing links and write outside the requested environment. The template writer tests exists() before unlinking, which misses dangling symlinks; the configuration writer opens the existing path directly. Anthropic's OSS Scanner reported this as in , received on 15 October 2026. ## Affected area Final file entries written during environment creation and seeding. ## Attacker-controlled input Another account must be able to prepare file links in the destination before creation. The invoking user must have write permission at the linked target. The destination parent must remain controlled during creation; concurrent parent-directory replacement is a separate concern. ## Affected code The relevant 21.14.8 source is in [template writer](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/activation/via_template.py), [configuration writer](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/create/pyenv_cfg.py). ## Mechanism removes an existing output only when is true. A dangling symlink therefore survives, and creates its target outside the environment. Other generated files have related final-entry behavior. opens without first replacing an existing link; a symlink or hard link there can overwrite an existing target. These paths require a prepared destination tree and the invoking user's permission to write the linked target. ## Reproduction and evidence The scanner's project tree contains and an executable . Before creation, a new interactive bash does not create the marker. A plain writes the activation script through the dangling link, creating as a regular file. Debian's stock sources that file; the next interactive bash adds to and the planted writes the marker. The reproducer checks that the link remains, appears, and the second shell executes the planted file. A separate manual check links to and observes the lat
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- PyPI virtualenv0 → 21.14.9
- pip virtualenv< 21.14.9
- pypi virtualenvversion unspecified
How to fix CVE-2026-113721
Upgrade
CVE-2026-113721 lists a fix boundary at 21.14.9. Compare the installed build with that boundary before you change production.
Version check
Affected < 21.14.9
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-113721. EPSS is 0.14%. Act only if a listed version of virtualenv is a tool is installed.
Which versions are affected?
Compare what you have installed with 0 → 21.14.9, < 21.14.9. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-59: Link Following. EPSS 0.14%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 20, 2026 · NIST NVD
Detected
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares
Oct 22, 2026 · NIST NVD
Updated
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares
Oct 22, 2026 · GitHub Advisory Database
Updated
## Summary Generated activation files and pyvenv.cfg can follow existing links and write outside the requested environment. The template writer tests exists() before unlinking, which misses dangling symlinks; the configuration writer opens the existing path directly. Anthropic's OSS Scanner reported this as in , received on 15 October 2026. ## Affected area Final file entries written during enviro
Oct 22, 2026 · PyPA Advisory Database
Fix available
virtualenv fixed in 21.14.9
Oct 22, 2026 · PyPA Advisory Database
Fix available
virtualenv fixed in 21.14.9
Oct 22, 2026 · PyPA Advisory Database
Updated
## Summary Generated activation files and pyvenv.cfg can follow existing links and write outside the requested environment. The template writer tests exists() before unlinking, which misses dangling symlinks; the configuration writer opens the existing path directly. Anthropic's OSS Scanner reported this as in , received on 15 October 2026. ## Affected area Final file entries written during enviro
Sources
- CVE.orgVulnerability recordCVE-2026-113721
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-113721
30-day exploitation probability 0.14%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-558c-9hv2-4prj
virtualenv: Generated files can follow existing destination links
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-113721
Generated activation files and pyvenv.cfg can follow existing links and write outside the requested environment. The template writer tests exists() before unlinking, which misses dangling symlinks; the configuration writer opens the existing path directly. Anthropic's OSS Scanner reported this as ANT-2026-XBEOCBS1 in virtualenv-20261015-005, received on 15 October 2026.
advisories.gitlab.com - NIST NVDVulnerability recordCVE-2026-113721
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.
nvd.nist.gov - PyPA Advisory DatabasePackage advisoryGHSA-558c-9hv2-4prj
virtualenv: Generated files can follow existing destination links
osv.dev
References
Freshness
Last verified in this catalog Nov 3, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSNov 3, 2026
- GitHub Advisory DatabaseOct 23, 2026
- PyPA Advisory DatabaseOct 23, 2026
- GitLab Advisory DatabaseOct 23, 2026
- CVE.orgOct 23, 2026
- NIST NVDOct 22, 2026