CVE-2025-4516
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3.12-idle | Amazon Linux | 3.12.10-2.amzn2023.0.2 |
| python-3.10 | Chainguard | 3.10.19-r0 |
| python3.12-tkinter | Amazon Linux | 3.12.10-2.amzn2023.0.2 |
| python-3.12 | Wolfi | 3.12.10-r2 |
| python-3.11 | Wolfi | 3.11.14-r0 |
| python-3.11 | Chainguard | 3.11.14-r0 |
| python3-tkinter | Amazon Linux | 3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18 |
| python3-devel | Amazon Linux | 3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18 |
| python3.11-libs | Amazon Linux | 3.11.12-2.amzn2023.0.2 |
| python3-test | Amazon Linux | 3.9.22-1.amzn2023.0.2, 3.7.16-1.amzn2.0.18 |
| libpython | Bitnami | 3.13.4, 3.12.11, 3.11.13, 3.10.18, 3.9.23 |
| python3 | Amazon Linux | 3.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
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.10.0, 3.11.0 |
| amazon:2023 | python3.12-idle | 0 |
| chainguard | python-3.10 | 0 |
| amazon:2023 | python3.12-tkinter | 0 |
| wolfi | python-3.12 | 0 |
| wolfi | python-3.11 | 0 |
| chainguard | python-3.11 | 0 |
| amazon:2 | python3-tkinter | 0 |
| amazon:2 | python3-devel | 0 |
| amazon:2023 | python3.11-libs | 0 |
| amazon:2 | python3-test | 0 |
| amazon:2 | python3 | 0 |
| wolfi | python-3.10 | 0 |
| chainguard | python-3.12 | 0 |
| amazon:2023 | python3-debug | 0 |
| amazon:2 | python3-tools | 0 |
| Python Software Foundation | CPython | 0, 3.14.0a1, 3.10.0 |
| amazon:2023 | python3-idle | 0 |
| amazon:2023 | python-unversioned-command | 0 |
| amazon:2023 | python3.11-tkinter | 0 |
…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
- issue-tracking
- patch
- vendor-advisory
- patch
- patch
- patch
- patch
- patch
- patch
- patch
- http://www.openwall.com/lists/oss-security/2025/05/19/1 url
- http://www.openwall.com/lists/oss-security/2025/05/16/4 url