Use After Free in Pypy
CVE-2026-76875
PyPy before versions 3.11.16 and 3.12.14 contains a use-after-free vulnerability in the pyexpat module's ExternalEntityParserCreate function that allows attackers to corrupt memory by supplying a crafted XML document to applications that create external-entity sub-parsers without retaining a reference to the parent parser. The child parser retains a raw C back-pointer to the parent parser struct while PyPy's tracing garbage collector can free the parent's C struct, causing bundled libexpat to dereference the freed pointer on every parsed token, producing memory corruption.
Vulnerability class: Use-After-Free
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
EPSS exploit prediction
EPSS 0.002, 15.2th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
References
- Release Notes (release-notes)
- PyPy release-pypy3.12-v8.0.0 Release Notes (release-notes, patch)
- PyPy release-pypy3.11-v8.0.0 Release Notes (release-notes, patch)
- www.vulncheck.com/advisories/pypy-pyexpat-externalentityparsercreate-use-after-… (third-party-advisory)