Skip to main content

CVE-2026-115586: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pypa virtualenv

0
High
VulnerabilityCVE-2026-115586cvecve-2026-115586cwe-78
Published: 10/23/2026 (10/23/2026, 19:34:46 UTC)
Source: CVE Database V5
Vendor/Project: pypa
Product: virtualenv

Description

CVE-2026-115586 is an OS command injection vulnerability in pypa virtualenv versions 21.14.9 through 21.14.12. The issue arises because the bash bin/activate script copies an attacker-controlled --prompt value into the PS1 environment variable without properly escaping special characters when certain shell options are disabled. This can lead to command execution when the prompt is expanded in a bash shell. The vulnerability is fixed in version 21.14.13.

CVSS v4.0

Score 7.1high

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

pypa

virtualenv

Affected versions
>=21.14.9 <21.14.13
virtualenv
pkg:pypi/virtualenv
Affected versions
>=21.14.9 <21.14.13

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/23/2026, 20:05:18 UTC

Technical Analysis

The vulnerability in pypa virtualenv affects versions from 21.14.9 up to but not including 21.14.13. When both promptvars and POSIX mode are disabled during activation, the bash bin/activate script copies the --prompt value into PS1 without escaping dollar signs or backticks. If an attacker controls the --prompt value, they can inject commands that get executed when the prompt is expanded, such as by re-enabling promptvars, setting POSIX mode, or starting an interactive child bash that inherits the PS1 variable. This constitutes an OS command injection (CWE-78). The issue is resolved in version 21.14.13.

Potential Impact

An attacker who can supply a malicious --prompt value can achieve command execution as the user activating the virtual environment. This could lead to unauthorized command execution within the context of the user's shell session. The vulnerability requires user interaction (activating the environment) and certain shell configurations to be exploitable.

Mitigation Recommendations

Upgrade virtualenv to version 21.14.13 or later, where this vulnerability is fixed. Until then, avoid using untrusted input for the --prompt option or ensure that promptvars and POSIX mode are enabled during activation to prevent command substitution. No other vendor advisory content is provided; patch status is confirmed fixed in 21.14.13.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-22T22:53:15.239Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6adbbaa6d73cc49347b780e9

Added to database: 10/23/2026, 19:51:02 UTC

Last enriched: 10/23/2026, 20:05:18 UTC

Last updated: 10/23/2026, 20:05:59 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses