{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min.","exploited":"There is no known exploitation of CVE-2025-4516 in the wild and no public exploit code.","fix":"Upgrade libpython to a fixed version for your release line: 3.9.23, 3.10.18, 3.11.13 or 3.12.11.","what":"CVE-2025-4516 is a medium-severity use after free vulnerability in CPython, published on 15 May 2025. 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-2025-4516 and fix it if it is affected.\n\nWhat it is: CVE-2025-4516 is a medium-severity use after free vulnerability in CPython, published on 15 May 2025. 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-2025-4516 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected all versions; fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4\n- python (Bitnami): affected all versions; fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4\n- python-min (Bitnami): affected all versions; fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4\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-2025-4516/ (Markdown: https://insights.sbomify.com/CVE-2025-4516/index.md)","id":"CVE-2025-4516","markdown":"https://insights.sbomify.com/CVE-2025-4516/index.md","name":"CVE-2025-4516","record":{"aliases":["ALPINE-CVE-2025-4516","AZL-61865","AZL-61870","BELL-CVE-2025-4516","BIT-libpython-2025-4516","BIT-python-2025-4516","BIT-python-min-2025-4516","CLEANSTART-2026-PS24751","CLSA-2025-1753209049","CLSA-2026-1767700070","CLSA-2026-1767700458","DEBIAN-CVE-2025-4516","ECHO-0e3f-250a-3e24","GHSA-j8r3-cghj-9jhg","MINI-gmw5-575m-65j7","MINI-hv4q-9j92-qh2c","MINI-pxv3-xjwm-9cxm","MINI-wwmg-3vxc-x25m","OESA-2025-2288","OESA-2025-2289","PSF-2025-4","SUSE-SU-2025:01877-1","SUSE-SU-2025:02038-1","UBUNTU-CVE-2025-4516","openSUSE-SU-2025:15141-1","openSUSE-SU-2025:15154-1","openSUSE-SU-2025:15163-1","openSUSE-SU-2025:15190-1","openSUSE-SU-2025:15191-1","openSUSE-SU-2025:15192-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Python standard library","requires_auth":"none","summary":"A use-after-free vulnerability in CPython's unicode_escape decoder allows attackers to cause crashes or execute code when specific error handlers are used.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"description":"There is an issue in CPython when using `bytes.decode(\"unicode_escape\", error=\"ignore|replace\")`. If you are not using the \"unicode_escape\" encoding or an error handler your usage is not affected. To work-around this issue you may stop using the error= handler and instead wrap the bytes.decode() call in a try-except catching the DecodeError.","ecosystems":["Bitnami","SUSE:Linux Enterprise Micro 5.1","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":"Use-after-free in \"unicode_escape\" decoder with error handler","id":"CVE-2025-4516","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"use_after_free","year":"2025"},"n_packages":13,"n_references":10,"next":{"headline":"Arbitrary writes via tarfile realpath overflow","id":"CVE-2025-4517"},"packages":[{"ecosystem":"Bitnami","fixed":["3.9.23","3.10.18","3.11.13","3.12.11","3.13.4"],"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-2025-4516"},{"ecosystem":"Bitnami","fixed":["3.9.23","3.10.18","3.11.13","3.12.11","3.13.4"],"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-2025-4516"},{"ecosystem":"Bitnami","fixed":["3.9.23","3.10.18","3.11.13","3.12.11","3.13.4"],"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-2025-4516"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.176.1"],"introduced":["0"],"last_affected":[],"package":"python3","purl":"pkg:rpm/suse/python3\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2025:01877-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.179.1"],"introduced":["0"],"last_affected":[],"package":"python3","purl":"pkg:rpm/suse/python3\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2025:02038-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.176.1"],"introduced":["0"],"last_affected":[],"package":"python3-core","purl":"pkg:rpm/suse/python3-core\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2025:01877-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.6.15-150000.3.179.1"],"introduced":["0"],"last_affected":[],"package":"python3-core","purl":"pkg:rpm/suse/python3-core\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2025:02038-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.10.17-4.1"],"introduced":["0"],"last_affected":[],"package":"python310","purl":"pkg:rpm/opensuse/python310\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15190-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.11.12-4.1"],"introduced":["0"],"last_affected":[],"package":"python311","purl":"pkg:rpm/opensuse/python311\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15191-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.12.10-4.1"],"introduced":["0"],"last_affected":[],"package":"python312","purl":"pkg:rpm/opensuse/python312\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15163-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.13.3-3.1"],"introduced":["0"],"last_affected":[],"package":"python313","purl":"pkg:rpm/opensuse/python313\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15154-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.14.0~b1-3.1"],"introduced":["0"],"last_affected":[],"package":"python314","purl":"pkg:rpm/opensuse/python314\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15141-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.9.22-3.1"],"introduced":["0"],"last_affected":[],"package":"python39","purl":"pkg:rpm/opensuse/python39\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15192-1"}],"prev":{"headline":"Zylon PrivateGPT settings.yaml cross-domain policy","id":"CVE-2025-4515"},"products":["CPython"],"published":"2025-05-15","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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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-07-31","vendors":["Python Software Foundation"]},"summary":"A use-after-free vulnerability in CPython's unicode_escape decoder allows attackers to cause crashes or execute code when specific error handlers are used.","url":"https://insights.sbomify.com/CVE-2025-4516/"}