{"vuln_id":"CVE-2026-113723","aliases":["GHSA-6w3r-xr62-4xcp"],"description":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash activation prompt. An attacker must influence the value passed to virtualenv, and a user must subsequently activate the environment and draw the prompt. This vulnerability is fixed in 21.14.9.","published_at":"2026-10-20T20:17:18.967000Z","modified_at":"2026-11-18T12:10:38.476413Z","first_seen_at":"2026-11-21T19:15:47.091349Z","severity":"high","severity_source":"nvd","cvss_score":7.1,"cvss_vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cwe":["CWE-78"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00235,"epss_percentile":0.1448,"nvd_status":"Analyzed","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-113723"},"matched_alias":null,"items":[{"id":10767,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-6w3r-xr62-4xcp: virtualenv: Bash prompt values can change meaning under older compatibility modes","summary":"virtualenv: Bash prompt values can change meaning under older compatibility modes\n\n## Summary\n\nCaller-supplied prompt text can become executable syntax in the bash activation prompt. An attacker must influence the\nvalue passed to virtualenv, and a user must subsequently activate the environment and draw the prompt.\n\n## Affected area\n\nBash runs with compatibility level 4.2 and draws the environment prompt. Its replacement-string behavior differs from\nnewer compatibility modes, leaving prompt text subject to a second interpretation. The report concerns POSIX activation.\nIt does not establish exposure through unrelated activators.\n\n## Attacker-controlled input\n\nThe attacker controls prompt or destination data passed as a virtualenv argument. The user later sources the generated\nactivation script.\n\n## Affected code\n\nThe relevant 21.14.8 source is in\n[bash prompt assembly](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/activation/bash/activate.sh).\n\n## Mechanism\n\n`bin/activate` copies the prompt into `PS1`. A shell expands `PS1` again when it draws a prompt, so the value must\nsurvive both the assignment and that later expansion. The bash and zsh branches escape for their usual prompt rules.\nThree other paths still interpret prompt data as commands: dash sourcing `activate` directly, a child dash inheriting an\nexported `PS1` from bash, and bash running at compatibility level 4.2 or lower. A value such as `x$(touch MARKER)y` then\nruns `touch` on prompt display. Creating the environment does not run the payload.\n\n## Reproduction and evidence\n\nThe scanner's child-shell reproducer creates an environment with `--prompt 'x$(touch MARKER)y'`, sources `bin/activate`\nin interactive bash, and starts interactive `sh` (dash). Its control leaves `PS1` unexported: neither shell creates\n`MARKER`. With `PS1` exported, bash displays the prompt without executing the value, but the child dash creates\n`MARKER`; the reproducer ends in `BUG`. The report gives separate console reproductions for direct dash activation and\nbash compatibility level 4.2. The child-shell path can arise after another environment's activation has exported `PS1`.\n\nThe scanner linked this finding to [#3326](https://github.com/pypa/virtualenv/pull/3326) and its follow-up #3390. Those\nchanges cover the usual bash path but leave the three paths above. The proposed change in\n[#3418](https://github.com/pypa/virtualenv/pull/3418) keeps a variable reference in `PS1`, so prompt text is expanded as\ndata when drawn. The private report's reproducer was run by the scanner; the later command-execution result was supplied\nby the maintainer review. This advisory does not claim that every POSIX shell or every bash mode is affected.\n\n## Introduced\n\nThe report traces direct dash sourcing to the first 20.x activator (20.0.0b1), and inherited `PS1` to #3390 (first\nreleased in 21.14.7). It demonstrates the compatibility-level case on bash 5.2. Those historical boundaries come from\nthe report; the release confirmed by the maintainer is 21.14.8.\n\n## Attack\n\nAffected: PyPI:virtualenv\n\nFixed in: 21.14.9\n\nReferences:\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-6w3r-xr62-4xcp\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-113723\nhttps://github.com/pypa/virtualenv/pull/3418\nhttps://github.com/pypa/virtualenv/commit/5f48d711731311428aebfae61d46957762155b22\nhttps://github.com/pypa/virtualenv\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9","url":"https://osv.dev/vulnerability/GHSA-6w3r-xr62-4xcp","published_at":"2026-10-23T22:21:57Z","updated_at":"2026-11-18T12:10:38.476413Z","fetched_at":"2026-11-21T19:15:55.946162Z","severity":"high","cvss_score":7.8,"epss":0.00235,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"virtualenv","vuln_id":"CVE-2026-113723","vuln_ids":["CVE-2026-113723","BIT-VIRTUALENV-2026-113723","GHSA-6W3R-XR62-4XCP","PYSEC-2026-4382"],"tags":["osv","pypi","fix-available"],"cluster_id":4109,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10767","html":"https://vulnwatch.ve1ve2.com/item/10767"}},{"id":11345,"source":{"id":"osv","name":"OSV.dev"},"title":"DEBIAN-CVE-2026-113723: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash…","summary":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash activation prompt. An attacker must influence the value passed to virtualenv, and a user must subsequently activate the environment and draw the prompt. This vulnerability is fixed in 21.14.9.\n\nAffected: Debian:12:python-virtualenv, Debian:13:python-virtualenv, Debian:14:python-virtualenv\n\nNo fixed version published yet\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2026-113723","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2026-113723","published_at":"2026-10-20T20:17:18.967000Z","updated_at":"2026-11-18T12:01:31.152105Z","fetched_at":"2026-11-21T19:23:21.853718Z","severity":"high","cvss_score":7.8,"epss":0.00235,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"debian","product":"12:python-virtualenv","vuln_id":"CVE-2026-113723","vuln_ids":["CVE-2026-113723","DEBIAN-CVE-2026-113723","GHSA-6W3R-XR62-4XCP"],"tags":["osv","debian","no-fix-yet"],"cluster_id":4108,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/11345","html":"https://vulnwatch.ve1ve2.com/item/11345"}},{"id":10768,"source":{"id":"osv","name":"OSV.dev"},"title":"PYSEC-2026-4382: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash…","summary":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash activation prompt. An attacker must influence the value passed to virtualenv, and a user must subsequently activate the environment and draw the prompt. This vulnerability is fixed in 21.14.9.\n\nAffected: PyPI:virtualenv\n\nFixed in: 21.14.9\n\nReferences:\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9\nhttps://github.com/pypa/virtualenv/commit/5f48d711731311428aebfae61d46957762155b22\nhttps://github.com/pypa/virtualenv/pull/3418\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-6w3r-xr62-4xcp","url":"https://osv.dev/vulnerability/PYSEC-2026-4382","published_at":"2026-10-20T20:17:18.967000Z","updated_at":"2026-11-18T12:10:38.476413Z","fetched_at":"2026-11-21T19:15:55.946162Z","severity":"high","cvss_score":7.8,"epss":0.00235,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"virtualenv","vuln_id":"CVE-2026-113723","vuln_ids":["CVE-2026-113723","BIT-VIRTUALENV-2026-113723","GHSA-6W3R-XR62-4XCP","PYSEC-2026-4382"],"tags":["osv","pypi","fix-available"],"cluster_id":4108,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10768","html":"https://vulnwatch.ve1ve2.com/item/10768"}},{"id":3767,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-113723: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash…","summary":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, caller-supplied prompt text can become executable syntax in the bash activation prompt. An attacker must influence the value passed to virtualenv, and a user must subsequently activate the environment and draw the prompt. This vulnerability is fixed in 21.14.9.\n\nReferences:\nhttps://github.com/pypa/virtualenv/commit/5f48d711731311428aebfae61d46957762155b22\nhttps://github.com/pypa/virtualenv/pull/3418\nhttps://github.com/pypa/virtualenv/releases/tag/21.14.9\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-6w3r-xr62-4xcp\nhttps://github.com/pypa/virtualenv/security/advisories/GHSA-6w3r-xr62-4xcp","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113723","published_at":"2026-10-20T20:17:18.967000Z","updated_at":"2026-11-17T16:46:52.230000Z","fetched_at":"2026-11-21T19:15:31.479291Z","severity":"high","cvss_score":7.8,"epss":0.00235,"is_kev":false,"has_exploit":true,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-113723","vuln_ids":["CVE-2026-113723","GHSA-6W3R-XR62-4XCP"],"tags":["CWE-78"],"cluster_id":4108,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/3767","html":"https://vulnwatch.ve1ve2.com/item/3767"}}]}