CVE-2025-4516: Python3.6 · There is an issue in CPython when using bytes.decode("unicode_escape"
Affects python3.6Source GCVE Database
Not known to be exploited · CVSS 5.9 Medium · fixed in 3.6.9-1~18.04ubuntu1.13+esm5 : update python3.6 when convenient.
Data as of 24 Nov 2026, 19:43 UTC
- Patch
- Available – fixed in 3.6.9-1~18.04ubuntu1.13+esm5, 3.7.5-2ubuntu1~18.04.2+esm6, 3.8.0-3ubuntu1~18.04.2+esm5 +6
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 15 May 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.04 LTSpython3.14pkg:deb/ubuntu/python3.14?arch=source&distro=resoluteOther threats | Affected
| Fixed in
|
Ubuntu 25.10python3.14pkg:deb/ubuntu/python3.14?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSpython3.12pkg:deb/ubuntu/python3.12?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 22.04 LTSpython3.10pkg:deb/ubuntu/python3.10?arch=source&distro=jammyOther threats | Affected
| Fixed in
|
Ubuntu Pro 22.04 LTSpython3.11pkg:deb/ubuntu/python3.11?arch=source&distro=esm-apps/jammyOther threats | Affected
| Fixed in
|
Ubuntu Pro 20.04 LTSpython3.8pkg:deb/ubuntu/python3.8?arch=source&distro=esm-infra/focalOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2025-4516 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-4516 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/ (opens in a new tab)
- github.com/python/cpython/pull/129648 (opens in a new tab)
- github.com/python/cpython/commit/9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e (opens in a new tab)
- github.com/python/cpython/commit/5646648678295a44aa82636c6e92826651baf33a (opens in a new tab)
- ubuntu.com/security/notices/USN-7570-1 (opens in a new tab)