CVE-2025-4516

NameCVE-2025-4516
DescriptionThere 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.
SourceCVE (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 PackageReleaseVersionStatus
python3.11 (PTS)bookworm3.11.2-6+deb12u6vulnerable
bookworm (security)3.11.2-6+deb12u3vulnerable
python3.12 (PTS)sid3.12.10-1vulnerable
python3.13 (PTS)sid, trixie3.13.3-2vulnerable
python3.9 (PTS)bullseye3.9.2-1vulnerable
bullseye (security)3.9.2-1+deb11u3vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python3.11source(unstable)(unfixed)
python3.12source(unstable)(unfixed)
python3.13source(unstable)(unfixed)
python3.9source(unstable)(unfixed)

Notes

https://mail.python.org/archives/list/security-announce@python.org/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/
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 (3.14)

Search for package or bug name: Reporting problems