CVE-2026-115586: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pypa 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
Affected software
pypa
virtualenv
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.