Incorrect Permission Assignment for Critical Resource Affecting virtualenv package, versions [21.14.8,21.14.9)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.13% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-VIRTUALENV-21282511
  • published21 Oct 2026
  • disclosed20 Oct 2026
  • creditAnthropic's OSS Scanner

Introduced: 20 Oct 2026

NewCVE-2026-113720  (opens in a new tab)
CWE-732  (opens in a new tab)

How to fix?

Upgrade virtualenv to version 21.14.9 or higher.

Overview

Affected versions of this package are vulnerable to Incorrect Permission Assignment for Critical Resource in the copy and copytree functions within src/virtualenv/util/path/_sync.py, files copied into a new virtual environment are created via shutil.copy, which does not use exclusive creation flags and does not enforce safe permissions at creation time. A local attacker who can race the file-creation window can replace a copied file - such as a Python interpreter or activation script - with a malicious payload, leading to privilege escalation or arbitrary code execution in the context of the user activating or using the virtual environment. The fix introduces _copy_file, which opens the destination with O_CREAT | O_EXCL and applies a mode derived from the source file's execute bits, eliminating the race window.

CVSS Base Scores

version 4.0
version 3.1