Pypy3: PyPy before versions 3.11.16 and 3.12.14 contains a use-after-free vulnerability in the pyexpat module's ExternalEntityParserCreate function that… (CVE-2026-76875)
Description
PyPy versions before 3.11.16 and 3.12.14 contain a use-after-free vulnerability in the pyexpat module's ExternalEntityParserCreate function. This flaw allows memory corruption when an application creates external-entity sub-parsers without retaining a reference to the parent parser. The vulnerability arises because the child parser holds a raw C pointer to the parent parser, which can be freed by PyPy's garbage collector, leading to dereferencing freed memory during XML parsing.
CVSS v3.1
Score 5.3medium
Affected software
pkg:deb/ubuntu/pypy3?arch=source&distro=focalpkg:deb/ubuntu/pypy3?arch=source&distro=jammypkg:deb/ubuntu/pypy3?arch=source&distro=noblepkg:deb/ubuntu/pypy3?arch=source&distro=stonkingpkg:deb/ubuntu/pypy3?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-76875 describes a use-after-free vulnerability in PyPy's pyexpat module affecting versions prior to 3.11.16 and 3.12.14. The issue occurs in the ExternalEntityParserCreate function where external-entity sub-parsers are created without maintaining a reference to the parent parser. The child parser retains a raw C back-pointer to the parent parser struct. PyPy's tracing garbage collector may free the parent's C struct while the child parser still references it, causing bundled libexpat to dereference freed memory on each parsed token, resulting in memory corruption.
Potential Impact
The vulnerability can lead to memory corruption in applications using the affected PyPy versions with the pyexpat module when parsing crafted XML documents that create external-entity sub-parsers without retaining parent references. This memory corruption could potentially be leveraged to cause application instability or other unintended behavior. The CVSS score is 5.3 (medium severity), indicating limited impact with no direct confidentiality or availability impact but with integrity impact.
Mitigation Recommendations
A fix is available in PyPy versions 3.11.16 and 3.12.14. Users should upgrade to these or later versions to remediate the vulnerability. No additional mitigation steps are indicated beyond applying the official patch.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-76875
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.10","Ubuntu:26.04:LTS"]
- Cvss Version
- 3.1
Threat ID: 6ad3f57e2cdf04f656662169
Added to database: 10/17/2026, 22:23:58 UTC
Last enriched: 10/17/2026, 23:44:07 UTC
Last updated: 10/17/2026, 23:44:07 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.