CVE-2025-4516

Use-after-free in "unicode_escape" decoder with error handler

MEDIUM
5.9
CVSS Score
Published: May 15, 2025 at 01:29 PM UTC
Updated: July 31, 2026 at 02:16 PM UTC
1 product affected across 1 vendorPython

Using CPython by Python Software Foundation?

Get instant alerts when new vulnerabilities affect CPython - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.9
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.9.233.10.0 ≤ v < 3.10.183.11.0 ≤ v < 3.11.133.12.0 ≤ v < 3.12.113.13.0 ≤ v < 3.13.43.14.0a1 ≤ v < 3.14.0b23.10.03.11.03.12.03.13.03.14.0a1
Affected range stops below 3.10.18, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.11.13, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.12.11, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.13.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.14.0b2, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.9.23, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.9MEDIUMPSF
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card