{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-9287 in the wild and no public exploit code.","fix":"Upgrade libpython to a fixed version for your release line: 3.9.21, 3.10.16, 3.11.11 or 3.12.8.","what":"CVE-2024-9287 is a medium-severity command injection vulnerability in Python Python, published on 22 Oct 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-9287 and fix it if it is affected.\n\nWhat it is: CVE-2024-9287 is a medium-severity command injection vulnerability in Python Python, published on 22 Oct 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-9287 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected all versions; fixed in 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.1\n- python (Bitnami): affected all versions; fixed in 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.1\n- python-min (Bitnami): affected all versions; fixed in 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.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-2024-9287/ (Markdown: https://insights.sbomify.com/CVE-2024-9287/index.md)","id":"CVE-2024-9287","markdown":"https://insights.sbomify.com/CVE-2024-9287/index.md","name":"CVE-2024-9287","record":{"aliases":["ALPINE-CVE-2024-9287","ALSA-2024:10979","ALSA-2024:11111","AZL-109677","AZL-50757","AZL-50926","BELL-CVE-2024-9287","BIT-libpython-2024-9287","BIT-python-2024-9287","BIT-python-min-2024-9287","CLEANSTART-2026-HT85293","CLSA-2024-1734543773","CLSA-2024-1734543883","CLSA-2025-1736503464","CLSA-2025-1736856534","CLSA-2025-1740132042","CLSA-2025-1740133056","CLSA-2025-1742466441","CLSA-2025-1747854434","CLSA-2025-1748638245","DEBIAN-CVE-2024-9287","GHSA-grqq-hcc7-crmr","MINI-58p4-mr75-8www","MINI-5wc3-m369-6w42","MINI-8xh2-w695-gm5x","MINI-pxj3-wgr4-3ff7","OESA-2024-2481","OESA-2024-2482","OESA-2024-2483","OESA-2024-2484","PSF-2024-12","RHSA-2024:10979","RHSA-2024:11024","RHSA-2024:11111","RHSA-2025:0280","RLSA-2024:10979","RLSA-2024:11111","SUSE-SU-2024:3760-1","SUSE-SU-2024:3879-1","SUSE-SU-2024:3924-1","SUSE-SU-2024:3929-1","SUSE-SU-2024:3944-1","SUSE-SU-2024:3945-1","SUSE-SU-2024:3957-1","SUSE-SU-2024:3958-1","SUSE-SU-2024:3959-1","SUSE-SU-2025:0048-1","UBUNTU-CVE-2024-9287","USN-7116-1","openSUSE-SU-2024:14426-1","openSUSE-SU-2024:14427-1","openSUSE-SU-2024:14428-1","openSUSE-SU-2024:14430-1","openSUSE-SU-2024:14455-1","openSUSE-SU-2024:14456-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python venv module","requires_auth":"high_privilege","summary":"Attackers can inject commands into virtual environment activation scripts, leading to code execution when the environment is activated.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[{"product":"python","vendor":"python"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/U:Green","version":"4.0"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-428","name":"Unquoted Search Path or Element"}],"description":"A vulnerability has been found in the CPython `venv` module and CLI where path names provided when creating a virtual environment were not quoted properly, allowing the creator to inject commands into virtual environment \"activation\" scripts (ie \"source venv/bin/activate\"). This means that attacker-controlled virtual environments are able to run commands when the virtual environment is activated. Virtual environments which are not created by an attacker or which aren't activated before being used (ie \"./venv/bin/python\") are not affected.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Bitnami","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:8::crb","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::crb","Red Hat:rhel_eus:9.4::appstream","Red Hat:rhel_eus:9.4::baseos","Red Hat:rhel_eus:9.4::crb","Rocky Linux:8","Rocky Linux:9","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Micro 5.3","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Micro 5.5","SUSE:Linux Enterprise Module for Basesystem 15 SP5","SUSE:Linux Enterprise Module for Basesystem 15 SP6","SUSE:Linux Enterprise Module for Development Tools 15 SP5","SUSE:Linux Enterprise Module for Development Tools 15 SP6","SUSE:Linux Enterprise Module for Legacy 15 SP5","SUSE:Linux Enterprise Module for Public Cloud 15 SP4","SUSE:Linux Enterprise Module for Python 3 15 SP5","SUSE:Linux Enterprise Module for Python 3 15 SP6","SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5","openSUSE:Leap 15.5","openSUSE:Leap 15.6","openSUSE:Leap Micro 5.5","openSUSE:Tumbleweed"],"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":"Virtual environment (venv) activation scripts don't quote paths","id":"CVE-2024-9287","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"python:python","products":["python:python"],"type":"command_injection","year":"2024"},"n_packages":149,"n_references":9,"next":{"headline":"WordPress \u0026 WooCommerce Affiliate Program \u003c= 8.4.1 - Authentication Bypass to Account Takeover and Privilege Escalation","id":"CVE-2024-9289"},"packages":[{"ecosystem":"Bitnami","fixed":["3.9.21","3.10.16","3.11.11","3.12.8","3.13.1"],"introduced":["0","3.10.0","3.11.0","3.12.0","3.13.0"],"last_affected":[],"package":"libpython","purl":"pkg:bitnami/libpython","source":"BIT-libpython-2024-9287"},{"ecosystem":"Bitnami","fixed":["3.9.21","3.10.16","3.11.11","3.12.8","3.13.1"],"introduced":["0","3.10.0","3.11.0","3.12.0","3.13.0"],"last_affected":[],"package":"python","purl":"pkg:bitnami/python","source":"BIT-python-2024-9287"},{"ecosystem":"Bitnami","fixed":["3.9.21","3.10.16","3.11.11","3.12.8","3.13.1"],"introduced":["0","3.10.0","3.11.0","3.12.0","3.13.0"],"last_affected":[],"package":"python-min","purl":"pkg:bitnami/python-min","source":"BIT-python-min-2024-9287"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/almalinux/python3.11","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/almalinux/python3.11-debug","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/almalinux/python3.11-devel","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-idle","purl":"pkg:rpm/almalinux/python3.11-idle","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/almalinux/python3.11-libs","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-rpm-macros","purl":"pkg:rpm/almalinux/python3.11-rpm-macros","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-test","purl":"pkg:rpm/almalinux/python3.11-test","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:8","fixed":["3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/almalinux/python3.11-tkinter","source":"ALSA-2024:10979"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/almalinux/python3.11","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/almalinux/python3.11-debug","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/almalinux/python3.11-devel","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-idle","purl":"pkg:rpm/almalinux/python3.11-idle","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/almalinux/python3.11-libs","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-test","purl":"pkg:rpm/almalinux/python3.11-test","source":"ALSA-2024:11111"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/almalinux/python3.11-tkinter","source":"ALSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debuginfo","purl":"pkg:rpm/redhat/python3.11-debuginfo","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debugsource","purl":"pkg:rpm/redhat/python3.11-debugsource","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/redhat/python3.11-devel","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/redhat/python3.11-libs","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-rpm-macros","purl":"pkg:rpm/redhat/python3.11-rpm-macros","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/redhat/python3.11-tkinter","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/redhat/python3.11-debug","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debuginfo","purl":"pkg:rpm/redhat/python3.11-debuginfo","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-debugsource","purl":"pkg:rpm/redhat/python3.11-debugsource","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-idle","purl":"pkg:rpm/redhat/python3.11-idle","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-test","purl":"pkg:rpm/redhat/python3.11-test","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:3.11.11-1.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/redhat/python3.11-tkinter","source":"RHSA-2024:10979"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-debuginfo","purl":"pkg:rpm/redhat/python3.11-debuginfo","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-debugsource","purl":"pkg:rpm/redhat/python3.11-debugsource","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/redhat/python3.11-devel","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/redhat/python3.11-libs","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/redhat/python3.11-tkinter","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:11111"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.9-7.el9_5.2"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/redhat/python3.11-debug","source":"RHSA-2024:11111"}],"prev":{"headline":"SQLi in TRtek Software's Distant Education Platform","id":"CVE-2024-9286"},"products":["CPython"],"published":"2024-10-22","related":[{"cvss_score":10,"headline":"Integer overflow in n/a","id":"CVE-2008-5031","kev_date_added":null,"published":"2008-11-10"},{"cvss_score":9.8,"headline":"Path traversal in n/a","id":"CVE-2014-4650","kev_date_added":null,"published":"2020-02-20"},{"cvss_score":9.8,"headline":"Integer overflow in n/a","id":"CVE-2016-5636","kev_date_added":null,"published":"2016-09-02"},{"cvss_score":9.8,"headline":"Path traversal in n/a","id":"CVE-2007-4559","kev_date_added":null,"published":"2007-08-28"},{"cvss_score":8.8,"headline":"Command injection in n/a","id":"CVE-2017-17522","kev_date_added":null,"published":"2017-12-14"},{"cvss_score":8.7,"headline":"Incremental HTMLParser feed() allows CPU-exhaustion DoS via repeated unterminated markup declarations","id":"CVE-2026-15308","kev_date_added":null,"published":"2026-07-09"},{"cvss_score":7.8,"headline":"Privilege escalation in n/a","id":"CVE-2019-13404","kev_date_added":null,"published":"2019-07-08"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"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":"Red Hat","prefix":"RHSA"},{"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":"total"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["Python Software Foundation"]},"summary":"Attackers can inject commands into virtual environment activation scripts, leading to code execution when the environment is activated.","url":"https://insights.sbomify.com/CVE-2024-9287/"}