Name | CVE-2025-4516 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
python3.11 (PTS) | bookworm | 3.11.2-6+deb12u6 | vulnerable |
| bookworm (security) | 3.11.2-6+deb12u3 | vulnerable |
python3.12 (PTS) | sid | 3.12.10-1 | vulnerable |
python3.13 (PTS) | trixie | 3.13.3-2 | vulnerable |
| sid | 3.13.5-2 | fixed |
python3.9 (PTS) | bullseye | 3.9.2-1 | vulnerable |
| bullseye (security) | 3.9.2-1+deb11u3 | vulnerable |
The information below is based on the following data on fixed versions.
Notes
[bookworm] - python3.11 <no-dsa> (Minor issue)
[bullseye] - python3.9 <postponed> (Minor issue, likely DoS-only, fix along with next update)
https://mail.python.org/archives/list/security-announce@python.org/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/
PoC: https://www.openwall.com/lists/oss-security/2025/05/19/1
https://github.com/python/cpython/issues/133767
https://github.com/python/cpython/pull/129648
https://github.com/python/cpython/commit/9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e (main)
https://github.com/python/cpython/commit/69b4387f78f413e8c47572a85b3478c47eba8142 (v3.14.0b2)
https://github.com/python/cpython/commit/6279eb8c076d89d3739a6edb393e43c7929b429d (v3.13.4)