{"answers":{"affected":"4 open source packages ship an affected version, including virtualenv. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-22702 in the wild and no public exploit code.","fix":"Upgrade virtualenv to 20.36.1 or later.","what":"CVE-2026-22702 is a medium-severity vulnerability in pypa virtualenv, published on 10 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-22702 and fix it if it is affected.\n\nWhat it is: CVE-2026-22702 is a medium-severity vulnerability in pypa virtualenv, published on 10 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-22702 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- virtualenv (Bitnami): affected all versions; fixed in 20.36.1\n- virtualenv (PyPI): affected all versions; fixed in 20.36.1\n- virtualenv (PyPI): affected all versions; fixed in 20.36.1\n- virtualenv (PyPI): affected all versions; fixed in 20.36.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-22702/ (Markdown: https://insights.sbomify.com/CVE-2026-22702/index.md)","id":"CVE-2026-22702","markdown":"https://insights.sbomify.com/CVE-2026-22702/index.md","name":"CVE-2026-22702","record":{"aliases":["AZL-74210","AZL-74237","BIT-virtualenv-2026-22702","DEBIAN-CVE-2026-22702","ECHO-bff4-eee0-85f1","GHSA-597g-3phw-6986","MINI-64r7-4747-gmq6","MINI-pq7m-m9vm-6xpx","OESA-2026-1185","OESA-2026-1186","OESA-2026-1187","OESA-2026-1188","PYSEC-2026-2009","ROOT-APP-PYPI-CVE-2026-22702","SUSE-SU-2026:0233-1","SUSE-SU-2026:20129-1","UBUNTU-CVE-2026-22702","openSUSE-SU-2026:20086-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["privilege_escalation","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python virtualenv tool","requires_auth":"low_privilege","summary":"Local attackers can exploit a race condition in virtualenv to redirect file operations via symlinks, potentially leading to privilege escalation or data modification.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"virtualenv","vendor":"virtualenv"}],"cvss":{"score":4.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"description":"virtualenv is a tool for creating isolated virtual python environments. Prior to version 20.36.1, TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations. An attacker with local access can exploit a race condition between directory existence checks and creation to redirect virtualenv's app_data and lock file operations to attacker-controlled locations. This issue has been patched in version 20.36.1.","ecosystems":["Bitnami","PyPI","SUSE:Linux Enterprise Module for Python 3 15 SP7","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP applications 16.0","openSUSE:Leap 15.6","openSUSE:Leap 16.0"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"virtualenv Has TOCTOU Vulnerabilities in Directory Creation","id":"CVE-2026-22702","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"race_condition","year":"2026"},"n_packages":9,"n_references":3,"next":{"headline":"Cosign verification accepts any valid Rekor entry under certain conditions","id":"CVE-2026-22703"},"packages":[{"ecosystem":"Bitnami","fixed":["20.36.1"],"introduced":["0"],"last_affected":[],"package":"virtualenv","purl":"pkg:bitnami/virtualenv","source":"BIT-virtualenv-2026-22702"},{"ecosystem":"PyPI","fixed":["20.36.1"],"introduced":["0"],"last_affected":[],"package":"virtualenv","purl":null,"source":"GHSA-597g-3phw-6986"},{"ecosystem":"PyPI","fixed":["20.36.1"],"introduced":["0"],"last_affected":[],"package":"virtualenv","purl":"pkg:pypi/virtualenv","source":"GHSA-597g-3phw-6986"},{"ecosystem":"PyPI","fixed":["20.36.1"],"introduced":["0"],"last_affected":[],"package":"virtualenv","purl":"pkg:pypi/virtualenv","source":"PYSEC-2026-2009"},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","fixed":["20.22.0-150400.9.9.1"],"introduced":["0"],"last_affected":[],"package":"python-virtualenv","purl":"pkg:rpm/suse/python-virtualenv\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP7","source":"SUSE-SU-2026:0233-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["20.29.3-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-virtualenv","purl":"pkg:rpm/suse/python-virtualenv\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:20129-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["20.29.3-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-virtualenv","purl":"pkg:rpm/suse/python-virtualenv\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:20129-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["20.22.0-150400.9.9.1"],"introduced":["0"],"last_affected":[],"package":"python-virtualenv","purl":"pkg:rpm/opensuse/python-virtualenv\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2026:0233-1"},{"ecosystem":"openSUSE:Leap 16.0","fixed":["20.29.3-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-virtualenv","purl":"pkg:rpm/opensuse/python-virtualenv\u0026distro=openSUSE%20Leap%2016.0","source":"openSUSE-SU-2026:20086-1"}],"prev":{"headline":"filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock","id":"CVE-2026-22701"},"products":["virtualenv"],"published":"2026-01-10","related":[{"cvss_score":8.4,"headline":"virtualenv allows command injection through activation scripts for a virtual environment","id":"CVE-2024-53899","kev_date_added":null,"published":"2024-11-24"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-01-12","vendors":["pypa"]},"summary":"Local attackers can exploit a race condition in virtualenv to redirect file operations via symlinks, potentially leading to privilege escalation or data modification.","url":"https://insights.sbomify.com/CVE-2026-22702/"}