{"id":2603,"cve":"CVE-2026-113715","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-113715\/","cwe":"CWE-93","cwe_number":93,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/93","cvss_score":2,"published":"2026-10-20","owasp":"A05 Security Misconfiguration","odc":"Checking","cdc":"Missing Check","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Local","impact":"Privilege Escalation","summary":"Path injection via line\u2011break characters in pyvenv.cfg alters home\/include\u2011system\u2011site\u2011packages settings.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-113715\/","description":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the stdlib venv creator reads generated pyvenv.cfg with str.splitlines() and merges parsed keys over virtualenv's selected configuration. An untrusted caller who influences the destination pathname can include a line-boundary character such as U+2028 to inject keys including home and include-system-site-packages, causing path data to change configuration structure before final output. Setting include-system-site-packages to true weakens environment isolation, while an altered home can change which standard-library files the interpreter loads if the attacker also controls that location. The builtin creator does not use this readback path. This issue is fixed in version 21.14.9.","solution":"Upgrade virtualenv to version\u202f21.14.9\u202for newer.","affected_component":"virtualenv","fixed_by_upgrading":true,"vulnerable_code":"import pathlib\n\ndef load_venv_cfg(cfg_path: pathlib.Path) -> dict:\n    \"\"\"\n    Parse a pyvenv.cfg file generated by the stdlib venv creator.\n    Returns a mapping of configuration keys to values.\n    \"\"\"\n    cfg = {}\n    # VULNERABLE: using splitlines() allows line\u2011boundary chars to inject extra keys\n    for line in cfg_path.read_text(encoding=\"utf-8\").splitlines():\n        if not line or line.startswith('#'):\n            continue\n        key, _, value = line.partition('=')\n        cfg[key.strip()] = value.strip()\n    return cfg\n","patched_code":"import pathlib\n\ndef load_venv_cfg(cfg_path: pathlib.Path) -> dict:\n    \"\"\"\n    Parse a pyvenv.cfg file generated by the stdlib venv creator.\n    Returns a mapping of configuration keys to values.\n    \"\"\"\n    cfg = {}\n    # FIX: use split('\\\\n') to avoid treating line\u2011boundary characters as line breaks\n    for line in cfg_path.read_text(encoding=\"utf-8\").split('\\n'):\n        if not line or line.startswith('#'):\n            continue\n        key, _, value = line.partition('=')\n        cfg[key.strip()] = value.strip()\n    return cfg\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"pypa\/virtualenv","commit_url":"https:\/\/github.com\/pypa\/virtualenv\/commit\/b0008a58885ded9227faf8f910c6c402712c750a","commit_subject":"\ud83d\udc1b fix(create): reject ambiguous venv paths (#3426)","units":[{"file":"src\/virtualenv\/create\/via_global_ref\/venv.py","function":null},{"file":"src\/virtualenv\/create\/via_global_ref\/venv.py","function":"Venv.set_pyenv_cfg"}]}],"references":null}