Skip to content
CVE Ledger
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • Data statusPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
  • Support the projectPage
Back

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.

Timeline

  1. ID reserved

    By PSF

  2. · 6 days later

    Published

  3. · 15 months later

    Record updated

Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.

Scores

CVSS scores of CVE-2025-4516, by who scored it
Scored byCVSSScoreVector
PSFCNA (assigner)4.0Medium5.9CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVDNVD · Deferred4.0Medium5.9CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS (exploitation in 30 days)
0.22% · top 87% of all CVEs (11 Nov 2026)
CISA SSVC
Exploitation: none · Automatable: no · Technical impact: partial
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.9.

Affected products

  • Python Software Foundation · CPython

    • affected < 3.9.23
    • affected 3.10.0 – < 3.10.18
    • affected 3.11.0 – < 3.11.13
    • affected 3.12.0 – < 3.12.11
    • affected 3.13.0 – < 3.13.4
    • affected 3.14.0a1 – < 3.14.0b2

References

12

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2025-4516 badge
[![CVE-2025-4516](https://cveledger.app/badge/CVE-2025-4516.svg)](https://cveledger.app/cve/CVE-2025-4516)

Record last updated .