CVE-2026-76875
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Summary
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.
Affected Software
| Vendor | Product | Version Range | Status |
|---|---|---|---|
| PyPy | PyPy | 0 < 3.11.16 | affected |
| PyPy | PyPy | 3.12.0 < 3.12.14 | affected |
Weaknesses
- CWE-416: Use After Free
References
- https://doc.pypy.org/release-v8.0.0.html
- https://github.com/pypy/pypy/releases/tag/release-pypy3.12-v8.0.0
- https://github.com/pypy/pypy/releases/tag/release-pypy3.11-v8.0.0
- https://www.vulncheck.com/advisories/pypy-pyexpat-externalentityparsercreate-use-after-free
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.