Skip to content
CVE PROGRAM SOURCE RECORD5.9 Medium

CVE-2025-4516

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

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 products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Python Software Foundation CPython

Default version status: unaffected

  • 0 to < 3.9.23affected
  • 3.10.0 to < 3.10.18affected
  • 3.11.0 to < 3.11.13affected
  • 3.12.0 to < 3.12.11affected
  • 3.13.0 to < 3.13.4affected
  • 3.14.0a1 to < 3.14.0b2affected

References