{"id":"CVE-2026-115586","title":"virtualenv: Bash activator leaves the --prompt value unescaped in PS1 when promptvars is off, so prompt expansion later executes it (regression in 21.14.9)","summary":"virtualenv is a tool for creating isolated virtual python environments. From 21.14.9 until 21.14.13, the bash bin/activate script can copy an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when bot…","severity":"high","cvss":7.1,"cvssVector":"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","cvssSource":"cna","cwe":["CWE-78"],"vendor":"pypa","product":"virtualenv","affected":["virtualenv >= 21.14.9, < 21.14.13"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-23T20:45:48.701499Z"},"published":"2026-10-23","updated":"2026-10-23","sourceUpdated":"2026-10-23T20:55:42.764Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-115586","references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-cx6f-vjhg-g3cc","label":"https://github.com/pypa/virtualenv/security/advisories/GHSA-cx6f-vjhg-g3cc"},{"url":"https://github.com/pypa/virtualenv/pull/3466","label":"https://github.com/pypa/virtualenv/pull/3466"},{"url":"https://github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4","label":"https://github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4"},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.14.13","label":"https://github.com/pypa/virtualenv/releases/tag/21.14.13"},{"url":"https://github.com/advisories/GHSA-cx6f-vjhg-g3cc"}],"tags":["cve.org","ghsa","pip"],"aliases":["GHSA-cx6f-vjhg-g3cc"],"ecosystem":"pip","patched":["virtualenv 21.14.13"],"ingestedAt":"2026-10-23T20:36:51.539Z","slug":"CVE-2026-115586","body":"## Overview\n\nvirtualenv is a tool for creating isolated virtual python environments. From 21.14.9 until 21.14.13, the bash bin/activate script can copy an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when both promptvars and POSIX mode are disabled during activation. Re-enabling promptvars, running set -o posix, or starting an interactive child bash that inherits the exported PS1 can then expand command substitution in the stored VIRTUAL_ENV_PROMPT value and execute commands as the user who activates the environment. This issue is fixed in version 21.14.13.\n\n## Affected\n\n- `virtualenv >= 21.14.9, < 21.14.13`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Package advisory (CVE-2026-115586)\n\nAffected packages:\n\n- `virtualenv >= 21.14.9, < 21.14.13`\n\nPatched in:\n\n- `virtualenv 21.14.13`\n\nSource: https://github.com/advisories/GHSA-cx6f-vjhg-g3cc","depth":"twilight","depthScore":39,"depthScoreParts":{"impact":39.1,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}