Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 13, 2025

This PR contains the following updates:

Package Change Age Confidence
virtualenv ==20.26.3==20.36.1 age confidence

GitHub Vulnerability Alerts

CVE-2024-53899

virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Magic template strings are not quoted correctly when replacing. NOTE: this is not the same as CVE-2024-9287.

CVE-2026-22702

Impact

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

Patches

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.

Workarounds

If you cannot upgrade immediately:

  1. Ensure VIRTUALENV_OVERRIDE_APP_DATA points to a directory owned by the current user with restricted permissions (mode 0700)
  2. Avoid running virtualenv in shared temporary directories where other users have write access
  3. Use separate user accounts for different projects to isolate app_data directories

References


Release Notes

pypa/virtualenv (virtualenv)

v20.36.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.36.0...20.36.1

v20.36.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.35.3...20.36.0

v20.35.4

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.35.3...20.35.4

v20.35.3

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.35.1...20.35.3

v20.35.2

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.35.1...20.35.2

v20.35.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.34.0...20.35.1

v20.35.0

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.34.0...20.35.0

v20.34.0

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.33.1...20.34.0

v20.33.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.33.0...20.33.1

v20.33.0

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.32.0...20.33.0

v20.32.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.31.2...20.32.0

v20.31.2

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.31.1...20.31.2

v20.31.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.31.0...20.31.1

v20.31.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.30.0...20.31.0

v20.30.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.29.3...20.30.0

v20.29.3

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.29.2...20.29.3

v20.29.2

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.29.1...20.29.2

v20.29.1

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.29.0...20.29.1

v20.29.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.28.1...20.29.0

v20.28.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.28.0...20.28.1

v20.28.0

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.27.2...20.28.0

v20.27.1

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.27.0...20.27.1

v20.27.0

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.26.5...20.27.0

v20.26.6

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.26.5...20.26.6

v20.26.5

Compare Source

What's Changed

Full Changelog: pypa/virtualenv@20.26.4...20.26.5

v20.26.4

Compare Source

What's Changed

New Contributors

Full Changelog: pypa/virtualenv@20.26.3...20.26.4


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@sonarqubecloud
Copy link

@renovate renovate bot changed the title Update dependency virtualenv to v20.26.6 [SECURITY] Update dependency virtualenv to v20.36.1 [SECURITY] Jan 13, 2026
@renovate renovate bot force-pushed the renovate/pypi-virtualenv-vulnerability branch from 618f95b to 63c7b37 Compare January 13, 2026 21:06
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants