Ubuntu CVE Tracker
UBUNTU-CVE-2025-4516
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Ubuntu:Pro:18.04:LTS | python3.6 | All versions before 3.6.9-1~18.04ubuntu1.13+esm5 (fixed in 3.6.9-1~18.04ubuntu1.13+esm5) |
| Ubuntu:Pro:18.04:LTS | python3.7 | All versions before 3.7.5-2ubuntu1~18.04.2+esm6 (fixed in 3.7.5-2ubuntu1~18.04.2+esm6) |
| Ubuntu:Pro:18.04:LTS | python3.8 | All versions before 3.8.0-3ubuntu1~18.04.2+esm5 (fixed in 3.8.0-3ubuntu1~18.04.2+esm5) |
| Ubuntu:Pro:20.04:LTS | python3.8 | All versions before 3.8.10-0ubuntu1~20.04.18+esm1 (fixed in 3.8.10-0ubuntu1~20.04.18+esm1) |
| Ubuntu:Pro:20.04:LTS | python3.9 | All versions before 3.9.5-3ubuntu0~20.04.1+esm5 (fixed in 3.9.5-3ubuntu0~20.04.1+esm5) |
| Ubuntu:22.04:LTS | python3.10 | All versions before 3.10.12-1~22.04.10 (fixed in 3.10.12-1~22.04.10) |
| Ubuntu:Pro:22.04:LTS | python3.11 | All versions before 3.11.0~rc1-1~22.04.1~esm4 (fixed in 3.11.0~rc1-1~22.04.1~esm4) |
| Ubuntu:24.04:LTS | python3.12 | All versions before 3.12.3-1ubuntu0.6 (fixed in 3.12.3-1ubuntu0.6) |
| Ubuntu:25.10 | python3.14 | All versions before 3.14.0-1 (fixed in 3.14.0-1) |
| Ubuntu:26.04:LTS | python3.14 | All versions before 3.14.0-1 (fixed in 3.14.0-1) |
References
- https://ubuntu.com/security/CVE-2025-4516
- https://www.cve.org/CVERecord?id=CVE-2025-4516
- https://mail.python.org/archives/list/[email protected]/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/
- https://github.com/python/cpython/pull/129648
- https://github.com/python/cpython/commit/9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e
- https://github.com/python/cpython/commit/5646648678295a44aa82636c6e92826651baf33a
- https://ubuntu.com/security/notices/USN-7570-1