Skip to content
Fencer Intel
medium 5.9

CVE-2025-4516 json

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

published last yr. modified 3mo ago also BIT-libpython-2025-4516 , BIT-python-2025-4516 , BIT-python-min-2025-4516 , EUVD-2025-15156

cvss
5.9
version 4.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 13%
public exploits
0
none known

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.

Patch / fix

  • bitnami libpython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
  • bitnami python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
  • bitnami python-min 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
  • Python Software Foundation CPython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b2
  • python3.11 Debian 12 3.11.2-6+deb12u7
  • python3.13 Debian 13 3.13.3-4

debian advisories DEBIAN-CVE-2025-4516

  • python3.10 Ubuntu 22.04 LTS 3.10.12-1~22.04.10
  • python3.12 Ubuntu 24.04 LTS 3.12.3-1ubuntu0.6
  • python3.14 Ubuntu 26.04 LTS, Ubuntu 25.10 3.14.0-1
  • python3.6 Ubuntu Pro 18.04 LTS 3.6.9-1~18.04ubuntu1.13+esm5
  • python3.7 Ubuntu Pro 18.04 LTS 3.7.5-2ubuntu1~18.04.2+esm6
  • python3.8 Ubuntu Pro 18.04 LTS 3.8.0-3ubuntu1~18.04.2+esm5
  • python3.8 Ubuntu Pro 20.04 LTS 3.8.10-0ubuntu1~20.04.18+esm1
  • python3.9 Ubuntu Pro 20.04 LTS 3.9.5-3ubuntu0~20.04.1+esm5

ubuntu advisories UBUNTU-CVE-2025-4516

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • numpy RHEL 8 1.19.4-3.module+el8.9.0+19644+d68f775d
  • scipy RHEL 8 1.5.4-5.module+el8.9.0+19644+d68f775d
  • Cython RHEL 8 0.29.21-5.module+el8.9.0+19644+d68f775d
  • pytest RHEL 8 6.0.2-2.module+el8.9.0+19644+d68f775d
  • PyYAML RHEL 8 5.4.1-1.module+el8.9.0+19644+d68f775d
  • mod_wsgi RHEL 8 4.7.1-7.module+el8.10.0+23075+0aa18782.1
  • pybind11 RHEL 8 2.7.1-1.module+el8.9.0+19644+d68f775d
  • python39 RHEL 8 3.9.25-2.module+el8.10.0+23718+1842ae33

red hat advisories RHSA-2025:23530

  • python3 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +18 more 3.6.15-150300.10.97.2
  • python3-core SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +20 more 3.6.15-150300.10.97.1
  • python3-documentation openSUSE Leap 15.6 3.6.15-150300.10.97.1
  • python311 Linux Micro 6.1 3.11.13-slfo.1.1_1.1
  • python311-core Linux Micro 6.1 3.11.13-slfo.1.1_1.1
  • python311 Linux Micro 6.0 3.11.13-1.1
  • python311-core Linux Micro 6.0 3.11.13-1.1
  • python313 SLE Module for Python 3 15 SP7 3.13.5-150700.4.11.1

suse advisories SUSE-SU-2025:02778-1SUSE-SU-2025:20539-1SUSE-SU-2025:02297-1SUSE-SU-2025:20492-1SUSE-SU-2025:02074-1SUSE-SU-2025:02057-1

  • python315 openSUSE Tumbleweed 3.15.0~a1-1.1
  • python310 openSUSE Tumbleweed 3.10.17-4.1
  • python311 openSUSE Tumbleweed 3.11.12-4.1
  • python39 openSUSE Tumbleweed 3.9.22-3.1
  • python312 openSUSE Tumbleweed 3.12.10-4.1
  • python313 openSUSE Tumbleweed 3.13.3-3.1
  • python314 openSUSE Tumbleweed 3.14.0~b1-3.1

opensuse advisories openSUSE-SU-2025:15713-1openSUSE-SU-2025:15190-1openSUSE-SU-2025:15191-1openSUSE-SU-2025:15192-1openSUSE-SU-2025:15163-1openSUSE-SU-2025:15154-1

  • python39 AlmaLinux 8 3.9.25-2.module_el8.10.0+4083+53cad1fb
  • python39-py AlmaLinux 8 1.10.0-1.module_el8.6.0+2780+a40f65e1
  • python39-pip AlmaLinux 8 20.2.4-9.module_el8.10.0+3765+2f9a457d
  • python39-ply AlmaLinux 8 3.11-10.module_el8.6.0+2780+a40f65e1
  • python39-six AlmaLinux 8 1.15.0-3.module_el8.6.0+2780+a40f65e1
  • python39-cffi AlmaLinux 8 1.14.3-2.module_el8.6.0+2780+a40f65e1
  • python39-cffi AlmaLinux 8 1.14.3-2.module_el8.6.0+3248+c431e88c
  • python39-idle AlmaLinux 8 3.9.25-2.module_el8.10.0+4083+53cad1fb

almalinux advisories ALSA-2025:23530

  • numpy Rocky Linux 8 1.19.4-3.module+el8.10.0+1582+bc278001
  • numpy Rocky Linux 8 1.19.4-3.module+el8.10.0+1860+afcc1c71
  • scipy Rocky Linux 8 1.5.4-5.module+el8.10.0+1860+afcc1c71
  • scipy Rocky Linux 8 1.5.4-5.module+el8.10.0+1582+bc278001
  • Cython Rocky Linux 8 0.29.21-5.module+el8.10.0+1582+bc278001
  • Cython Rocky Linux 8 0.29.21-5.module+el8.10.0+1860+afcc1c71
  • pytest Rocky Linux 8 6.0.2-2.module+el8.10.0+1860+afcc1c71
  • pytest Rocky Linux 8 6.0.2-2.module+el8.10.0+1582+bc278001

rocky linux advisories RLSA-2025:23530

  • python3 Alpine 3.19, Alpine 3.18 3.11.12-r1
  • python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.10-r1

alpine advisories ALPINE-CVE-2025-4516

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python3 CBL-Mariner 2.0 3.9.19-14
  • python3 Azure Linux 3.0 3.12.9-2

azure linux advisories AZL-61865AZL-61870

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Is CVE-2025-4516 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-4516 updated cvss 5.1

cpython: python: CPython DecodeError Handling Vulnerability

  • Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 scipy, python3, python36, python3.11, python3.12, python-nose, +37 more Red Hat Enterprise Linux 9 python3, python3.9, python3.11, python3.12, python3-idle, python3-libs, +11 more Red Hat Enterprise Linux 10 python3.12 Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +7 more
    affected: workaround, no fix available “Fix deferred”
  • Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9
    under investigation
  • Red Hat Enterprise Linux AppStream (v. 8) scipy 1.5.4-5.module+el8.9.0+19644+d68f775d, numpy 1.19.4-3.module+el8.9.0+19644+d68f775d, PyYAML 5.4.1-1.module+el8.9.0+19644+d68f775d, python-ply 3.11-10.module+el8.9.0+19644+d68f775d, python39 3.9.25-2.module+el8.10.0+23718+1842ae33, mod_wsgi 4.7.1-7.module+el8.10.0+23075+0aa18782.1, +49 more Red Hat Enterprise Linux CRB (v. 8) pytest 6.0.2-2.module+el8.9.0+19644+d68f775d, Cython 0.29.21-5.module+el8.9.0+19644+d68f775d, pybind11 2.7.1-1.module+el8.9.0+19644+d68f775d, python-py 1.10.0-1.module+el8.9.0+19644+d68f775d, python39-py 1.10.0-1.module+el8.9.0+19644+d68f775d, python-attrs 20.3.0-2.module+el8.9.0+19644+d68f775d, +16 more
    fixed: vendor fix RHSA-2025:23530

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

cisa ICSA-26-043-06 updated cvss 5.1

Siemens SINEC OS

  • Siemens RUGGEDCOM RST2428P (6GK6242-6PA00) < 3.3
    affected: fixed in V3.3 support.industry.siemens.com
  • Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < 3.3
    affected: fixed in V3.3
  • Siemens SCALANCE XCH328 (6GK5328-4TS01-2EC2) < 3.3 Siemens SCALANCE XCM324 (6GK5324-8TS01-2AC2) < 3.3 Siemens SCALANCE XCM328 (6GK5328-4TS01-2AC2) < 3.3 Siemens SCALANCE XCM332 (6GK5332-0GA01-2AC2) < 3.3 Siemens SCALANCE XRH334 (24 V DC, 8xFO, CC) (6GK5334-2TS01-2ER3) < 3.3 Siemens SCALANCE XRM334 (2x230 V AC, 8xFO) (6GK5334-2TS01-4AR3) < 3.3
    +8 more products
    Siemens SCALANCE XRM334 (2x230 V AC, 12xFO) (6GK5334-3TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (2x230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 8xFO) (6GK5334-2TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 12xFO) (6GK5334-3TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24V DC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 8xFO) (6GK5334-2TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 12xFO) (6GK5334-3TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-3AR3) < 3.3
    affected: fixed in V3.3 support.industry.siemens.com

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
last yr.

Exploit prediction

0.23% chance of exploitation in the next 30 days, higher than 13% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 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
CNA 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/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

Affected packages

ecosystem package affected fixed in
bitnami libpython
<3.9.23
>=3.10.0, <3.10.18
>=3.11.0, <3.11.13
>=3.12.0, <3.12.11
>=3.13.0, <3.13.4
3.9.23
3.10.18
3.11.13
3.12.11
3.13.4
bitnami python
<3.9.23
>=3.10.0, <3.10.18
>=3.11.0, <3.11.13
>=3.12.0, <3.12.11
>=3.13.0, <3.13.4
3.9.23
3.10.18
3.11.13
3.12.11
3.13.4
bitnami python-min
<3.9.23
>=3.10.0, <3.10.18
>=3.11.0, <3.11.13
>=3.12.0, <3.12.11
>=3.13.0, <3.13.4
3.9.23
3.10.18
3.11.13
3.12.11
3.13.4

Affected products

  • Python Software Foundation CPython

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.