Vulnerabilities

Security fix · CVE-2026-113776

virtualenv activation scripts run code from a path that contains a placeholder name

Published Oct 21, 2026 · catalog updated Oct 21, 2026 · virtualenv activation scripts run

Last checked Nov 3, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-113776. EPSS is 0.27%. Act only if a listed version of virtualenv activation scripts run is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (virtualenv activation scripts run).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High7.8
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.27%
Remediation
Version ranges on file
Affected products
PyPI virtualenv · pip virtualenv

### Impact replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment. holds the environment's directory name, so a destination such as is enough. In the default for bash, the line renders as: Sourcing that script runs . The same payload in a path without the placeholder name runs nothing. runs the command the same way, and the reporter also showed Python code execution through and . In , a directory named after a prompt display placeholder, such as , breaks the script with . No change to can stop this, because the rewrite happens after ran; it defeats and alike. An attacker needs to influence the destination path or : a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive. The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop. ### Patches Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74 ### Workarounds Do not create an environment whose path or contains a placeholder name such as , or , and inspect the generated activation script before you source one you did not create. ### Credits Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI virtualenv20.26.6 → 21.14.2
  • pip virtualenv>= 20.26.6, <= 21.14.1

How to fix CVE-2026-113776

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-113776. EPSS is 0.27%. Act only if a listed version of virtualenv activation scripts run is installed.

Which versions are affected?

Compare what you have installed with 20.26.6 → 21.14.2, >= 20.26.6, <= 21.14.1. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-78: OS Command Injection; CWE-94: Code Injection. EPSS 0.27%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 21, 2026 · GitHub Advisory Database

    Detected

    ### Impact replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates th

  2. Oct 21, 2026 · GitHub Advisory Database

    Fix available

    virtualenv fixed in 21.14.2

  3. Oct 21, 2026 · GitHub Advisory Database

    Fix available

    virtualenv fixed in 21.14.2

  4. Oct 21, 2026 · GitHub Advisory Database

    Updated

    ### Impact replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates th

Sources

References

Freshness

Last verified in this catalog Nov 3, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSNov 3, 2026
  • GitHub Advisory DatabaseOct 21, 2026
  • CVE.orgOct 21, 2026
  • PyPA Advisory DatabaseOct 21, 2026
  • OpenSSF OSV / OSV ScannerOct 21, 2026