# CVE-2026-113721: virtualenv: Generated files can follow existing destination links

- Severity: Medium 4.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-20T19:46:28.770Z
- Modified: 2026-11-27T06:45:51.183Z
- Also known as: GHSA-558c-9hv2-4prj, BIT-VIRTUALENV-2026-113721, PYSEC-2026-4380
- Weaknesses: CWE-59
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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 final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.

(As written by CVE List.)

## Affected

- pypa virtualenv: < 21.14.9
- virtualenv (PyPI): before 21.14.9; from 20.0.0 before 21.14.9
- virtualenv virtualenv: from 20.0.0 before 21.14.9
- virtualenv (Bitnami): before 21.14.9

## Every score

- GitHub_M: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- PyPA Advisory Database: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/pypa/virtualenv/security/advisories/GHSA-558c-9hv2-4prj> (exploit, advisory, evidence, mitigation, vendor-advisory, web)
- <https://github.com/pypa/virtualenv/pull/3431> (fix, issue-tracking, patch, web)
- <https://github.com/pypa/virtualenv/commit/d25f28699eefb1fc34a251e5adf2b5de844c36cd> (fix, patch, web)
- <https://github.com/pypa/virtualenv/releases/tag/21.14.9> (advisory, article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-113721> (advisory, web)
- <https://github.com/pypa/virtualenv> (package)

## Sources

- CVE List: [CVE-2026-113721](https://www.cve.org/CVERecord?id=CVE-2026-113721), CVE Terms of Use, modified 2026-10-28
- GitHub Advisory Database: [GHSA-558c-9hv2-4prj](https://github.com/advisories/GHSA-558c-9hv2-4prj), CC-BY-4.0, modified 2026-11-18
- NVD: [CVE-2026-113721](https://nvd.nist.gov/vuln/detail/CVE-2026-113721), Public domain, modified 2026-11-17
- PyPA Advisory Database: [PYSEC-2026-4380](https://osv.dev/vulnerability/PYSEC-2026-4380), CC-BY-4.0, modified 2026-11-18
- Bitnami Vulnerability Database: [BIT-VIRTUALENV-2026-113721](https://osv.dev/vulnerability/BIT-VIRTUALENV-2026-113721), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-113721 · Whole record: https://cve.day/CVE-2026-113721.json · Rebuilt by cve.day 2026-11-27T07:07:27.426Z
