{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min.","exploited":"There is no known exploitation of CVE-2024-5642 in the wild and no public exploit code.","fix":"Upgrade libpython to 3.9.24 or later.","what":"CVE-2024-5642 is a medium-severity memory corruption vulnerability in CPython, published on 27 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-5642 and fix it if it is affected.\n\nWhat it is: CVE-2024-5642 is a medium-severity memory corruption vulnerability in CPython, published on 27 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-5642 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected all versions; fixed in 3.9.24\n- python (Bitnami): affected all versions; fixed in 3.9.24\n- python-min (Bitnami): affected all versions; fixed in 3.9.24\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-5642/ (Markdown: https://insights.sbomify.com/CVE-2024-5642/index.md)","id":"CVE-2024-5642","markdown":"https://insights.sbomify.com/CVE-2024-5642/index.md","name":"CVE-2024-5642","record":{"aliases":["BIT-libpython-2024-5642","BIT-python-2024-5642","BIT-python-min-2024-5642","DEBIAN-CVE-2024-5642","ECHO-92bd-fc28-530b","GHSA-hrvr-7x5w-xpmq","OESA-2025-2637","OESA-2025-2638","PSF-2024-6","ROOT-OS-DEBIAN-11-CVE-2024-5642","SUSE-SU-2024:3351-1","SUSE-SU-2024:3353-1","UBUNTU-CVE-2024-5642"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Python standard library","requires_auth":"none","summary":"An attacker can cause a buffer over-read and potential denial of service by configuring an empty list for NPN protocols in Python's SSL module.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","version":"3.1"},"cwes":[],"description":"CPython 3.9 and earlier doesn't disallow configuring an empty list (\"[]\") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used (see CVE-2024-5535 for OpenSSL). This vulnerability is of low severity due to NPN being not widely used and specifying an empty list likely being uncommon in-practice (typically a protocol name would be configured).","ecosystems":["Bitnami","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Software Development Kit 12 SP5"],"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":"Buffer overread when using an empty list with SSLContext.set_npn_protocols()","id":"CVE-2024-5642","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"memory_corruption","year":"2024"},"n_packages":10,"n_references":8,"next":{"headline":"WordPress Plugin Tournamatch \u003c 4.6.1 - Admin+ Stored XSS via Ladders","id":"CVE-2024-5644"},"packages":[{"ecosystem":"Bitnami","fixed":["3.9.24"],"introduced":["0"],"last_affected":[],"package":"libpython","purl":"pkg:bitnami/libpython","source":"BIT-libpython-2024-5642"},{"ecosystem":"Bitnami","fixed":["3.9.24"],"introduced":["0"],"last_affected":[],"package":"python","purl":"pkg:bitnami/python","source":"BIT-python-2024-5642"},{"ecosystem":"Bitnami","fixed":["3.9.24"],"introduced":["0"],"last_affected":[],"package":"python-min","purl":"pkg:bitnami/python-min","source":"BIT-python-min-2024-5642"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.158.1"],"introduced":["0"],"last_affected":[],"package":"python3","purl":"pkg:rpm/suse/python3\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2024:3351-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.158.1"],"introduced":["0"],"last_affected":[],"package":"python3-core","purl":"pkg:rpm/suse/python3-core\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2024:3351-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["3.6.15-64.1"],"introduced":["0"],"last_affected":[],"package":"python36","purl":"pkg:rpm/suse/python36\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2024:3353-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["3.6.15-64.1"],"introduced":["0"],"last_affected":[],"package":"python36-core","purl":"pkg:rpm/suse/python36-core\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2024:3353-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","fixed":["3.6.15-64.1"],"introduced":["0"],"last_affected":[],"package":"python36","purl":"pkg:rpm/suse/python36\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5","source":"SUSE-SU-2024:3353-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","fixed":["3.6.15-64.1"],"introduced":["0"],"last_affected":[],"package":"python36-core","purl":"pkg:rpm/suse/python36-core\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5","source":"SUSE-SU-2024:3353-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP5","fixed":["3.6.15-64.1"],"introduced":["0"],"last_affected":[],"package":"python36-core","purl":"pkg:rpm/suse/python36-core\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5","source":"SUSE-SU-2024:3353-1"}],"prev":{"headline":"One Click Order Re-Order \u003c= 1.1.9 - Missing Authorization to Authenticated (Subscriber+) Stored Cross-Site Scripting","id":"CVE-2024-5641"},"products":["CPython"],"published":"2024-06-27","related":[],"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":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-31","vendors":["Python Software Foundation"]},"summary":"An attacker can cause a buffer over-read and potential denial of service by configuring an empty list for NPN protocols in Python's SSL module.","url":"https://insights.sbomify.com/CVE-2024-5642/"}