Loading advisory.
Loading advisory.
virtualenv Has TOCTOU Vulnerabilities in Directory Creation
TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations.
Published 2026-01-10 06:05 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| virtualenv | PyPI | < 20.36.1 versions 0.8, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9, 0.9.1, 0.9.2, 1.0, 1.1, 1.10, 1.10.1, 1.11, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.11.6, 1.2 and 225 more | 20.36.1 | pip install --upgrade 'virtualenv>=20.36.1' |
TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations. An attacker with local access can exploit a race condition between directory existence checks and creation to redirect virtualenv's app_data and lock file operations to attacker-controlled locations.
Affected versions: All versions up to and including 20.36.1
Affected users: Any user running virtualenv on multi-user systems where untrusted local users have filesystem access to shared temporary directories or where VIRTUALENV_OVERRIDE_APP_DATA points to a user-writable location.
Attack scenarios:
Cache poisoning: Attacker corrupts wheels or Python metadata in the cache
Information disclosure: Attacker reads sensitive cached data or metadata
Lock bypass: Attacker controls lock file semantics to cause concurrent access violations
Denial of service: Lock starvation preventing virtualenv operations
The vulnerability has been patched by replacing check-then-act patterns with atomic os.makedirs(..., exist_ok=True) operations.
Fixed in: PR #3013
Versions with the fix: 20.36.2 and later
Users should upgrade to version 20.36.2 or later.
If you cannot upgrade immediately:
Ensure VIRTUALENV_OVERRIDE_APP_DATA points to a directory owned by the current user with restricted permissions (mode 0700)
Avoid running virtualenv in shared temporary directories where other users have write access
Use separate user accounts for different projects to isolate app_data directories
GitHub PR: https://github.com/pypa/virtualenv/pull/3013
Vulnerability reported by: @tsigouris007
CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization (TOCTOU)
CWE-59: Improper Link Resolution Before File Access
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.001 on 2026-11-24 to 0.001 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.001 | first score | v2026.06.15 |
| 2026-11-26 | 0.001 | 0.001 | v2026.06.15 |