{"id":"CVE-2025-4516","summary":"Use-after-free in \"unicode_escape\" decoder with error handler","details":"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.","aliases":["BIT-libpython-2025-4516","BIT-python-2025-4516","BIT-python-min-2025-4516","PSF-2025-4"],"modified":"2026-05-15T04:13:52.263251452Z","published":"2025-05-15T13:29:20.126Z","related":["ALSA-2025:23530","CGA-wjx3-hqwp-78pc","SUSE-SU-2025:01877-1","SUSE-SU-2025:02038-1","SUSE-SU-2025:02047-1","SUSE-SU-2025:02048-1","SUSE-SU-2025:02049-1","SUSE-SU-2025:02050-1","SUSE-SU-2025:02057-1","SUSE-SU-2025:02074-1","SUSE-SU-2025:02297-1","SUSE-SU-2025:02778-1","SUSE-SU-2025:20374-1","SUSE-SU-2025:20492-1","SUSE-SU-2025:20539-1","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","openSUSE-SU-2025:15713-1"],"database_specific":{"cwe_ids":["CWE-416"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/4xxx/CVE-2025-4516.json","cna_assigner":"PSF"},"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2025/05/16/4"},{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2025/05/19/1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/4xxx/CVE-2025-4516.json"},{"type":"ADVISORY","url":"https://mail.python.org/archives/list/security-announce@python.org/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-4516"},{"type":"REPORT","url":"https://github.com/python/cpython/issues/133767"},{"type":"FIX","url":"https://github.com/python/cpython/commit/4398b788ffc1f954a2c552da285477d42a571292"},{"type":"FIX","url":"https://github.com/python/cpython/commit/6279eb8c076d89d3739a6edb393e43c7929b429d"},{"type":"FIX","url":"https://github.com/python/cpython/commit/69b4387f78f413e8c47572a85b3478c47eba8142"},{"type":"FIX","url":"https://github.com/python/cpython/commit/73b3040f592436385007918887b7e2132aa8431f"},{"type":"FIX","url":"https://github.com/python/cpython/commit/8d35fd1b34935221aff23a1ab69a429dd156be77"},{"type":"FIX","url":"https://github.com/python/cpython/commit/9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e"},{"type":"FIX","url":"https://github.com/python/cpython/commit/ab9893c40609935e0d40a6d2a7307ea51aec598b"},{"type":"FIX","url":"https://github.com/python/cpython/pull/129648"},{"type":"PACKAGE","url":"https://github.com/python/cpython"}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}