{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-102938","id":"CVE-2026-102938","title":"virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection","description":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg format while PyEnvCfg._read_values() parses the file with str.splitlines() and accepts the last value for duplicate keys. An attacker who influences --prompt, VIRTUALENV_PROMPT, or configuration input can insert a recognized line b","descriptionLong":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg format while PyEnvCfg._read_values() parses the file with str.splitlines() and accepts the last value for duplicate keys. An attacker who influences --prompt, VIRTUALENV_PROMPT, or configuration input can insert a recognized line boundary and additional keys, including home, causing consumers to use an attacker-selected base interpreter or corrupted environment metadata. The security impact requires prompt input from outside the operator's trust boundary; directly supplied prompt content primarily corrupts the operator's own environment. This issue is fixed in version 21.7.11.","published":"2026-09-29T20:58:20.696Z","updated":"2026-11-19T19:51:23.310Z","reserved":"2026-09-29T20:24:43.340Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"medium","source":"GitHub_M"},{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/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","rating":"medium","source":"github.com"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["pypa virtualenv"],"affectedProducts":[{"vendor":"pypa","product":"virtualenv","defaultStatus":null,"versions":[{"version":"< 21.7.11","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"virtualenv","purl":"pkg:pypi/virtualenv","ranges":["<21.7.11"],"fixed":["21.7.11"],"advisory":"GHSA-9h9j-4vrj-gf7g"}],"cwes":["CWE-93"],"aliases":["BIT-virtualenv-2026-102938","GHSA-9h9j-4vrj-gf7g","PYSEC-2026-4012"],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-9h9j-4vrj-gf7g","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/pypa/virtualenv/pull/3247","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/pypa/virtualenv/commit/a30f995461043acb6cacbf3a890951563ccf7140","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.7.11","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102938.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102938","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2026-4012.yaml","tags":["web"]},{"url":"https://github.com/pypa/virtualenv","tags":["package"]},{"url":"https://pypi.org/project/virtualenv","tags":["web","package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00146,"epssPercentile":0.03953,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-102938","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102938","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-102938","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9h9j-4vrj-gf7g","ok":true,"note":"GHSA-9h9j-4vrj-gf7g"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-102938","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}