VDB

CVE-2025-4516

CVE-2025-4516 PUBLISHED CVSS 5.9 MEDIUM

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

Reported by psf · Published May 15, 2025

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
python3.12-idleAmazon Linux3.12.10-2.amzn2023.0.2
python-3.10Chainguard3.10.19-r0
python3.12-tkinterAmazon Linux3.12.10-2.amzn2023.0.2
python-3.12Wolfi3.12.10-r2
python-3.11Wolfi3.11.14-r0
python-3.11Chainguard3.11.14-r0
python3-tkinterAmazon Linux3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18
python3-develAmazon Linux3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18
python3.11-libsAmazon Linux3.11.12-2.amzn2023.0.2
python3-testAmazon Linux3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18
libpythonBitnami3.13.4, 3.12.11, 3.11.13, 3.10.18, 3.9.23
python3Amazon Linux3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18

41 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 4.0
5.9
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected products

VendorProductVersions
Python Software FoundationCPython0, 3.10.0, 3.11.0
amazon:2023python3.12-idle0
chainguardpython-3.100
amazon:2023python3.12-tkinter0
wolfipython-3.120
wolfipython-3.110
chainguardpython-3.110
amazon:2python3-tkinter0
amazon:2python3-devel0
amazon:2023python3.11-libs0
amazon:2python3-test0
amazon:2python30
wolfipython-3.100
chainguardpython-3.120
amazon:2023python3-debug0
amazon:2python3-tools0
Python Software FoundationCPython0, 3.14.0a1, 3.10.0
amazon:2023python3-idle0
amazon:2023python-unversioned-command0
amazon:2023python3.11-tkinter0

…and 21 more

Timeline

  • May 15, 2025 CVE Published
  • May 16, 2025 EPSS Score (30 in total, the first dated here)
  • May 19, 2025 Coalition ESS Score (15 in total, the first dated here)
  • Jun 2, 2026 Security Advisory (21 in total, the first dated here)
  • Aug 11, 2026 Distribution Patch (6 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-4516
vulnetix vdb fixes CVE-2025-4516

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-4516/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›