Skip to main content
← All vulnerabilities
CVE-2025-4516

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, and 1 more
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • Python Software Foundation CPython

    fixed in 3.9.23; From 3.10.0 · fixed in 3.10.18; From 3.11.0 · fixed in 3.11.13; From 3.12.0 · fixed in 3.12.11; From 3.13.0 · fixed in 3.13.4; From 3.14.0a1 · fixed in 3.14.0b2

References 10

GitHub · python/cpython

mail.python.org