VDB
Sign up
MEDIUM4.5

PYSEC-2026-4378

Quick fix

PYSEC-2026-4378 — virtualenv: upgrade to the fixed version with the command below.

pip install --upgrade 'virtualenv>=21.14.9'

Details

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-package metadata and _uninstall_dist() joins entries from top_level.txt and RECORD to site-packages without checking containment. When a reused destination contains distribution metadata influenced by another account, relative traversal, absolute entries, or linked parents can cause app-data reseeding to delete files outside the environment or the environment root with the invoking user's permissions, provided that user has deletion rights over the named paths. The deletion occurs during environment creation before any later use of the environment. Fresh environments without existing package metadata and creation with --clear do not enter this cleanup path. This issue is fixed in version 21.14.9.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/virtualenv
Introduced in: 20.8.1Fixed in: 21.14.9
Fixpip install --upgrade 'virtualenv>=21.14.9'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/virtualenv"]}'