Description
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.
Published: 2026-09-29
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Memory corruption via use‑after‑free potentially leading to arbitrary code execution
Action: Immediate Patch
AI Analysis

Impact

PyPy prior to versions 3.11.16 and 3.12.14 has a use‑after‑free flaw in the pyexpat module’s ExternalEntityParserCreate function. The flaw arises when an external‑entity sub‑parser is created without keeping a reference to its parent. The child parser holds a raw C back‑pointer to the parent’s struct, and PyPy’s tracing garbage collector may free this parent struct while the child still accesses it. Each parsed token then causes bundled libexpat to dereference the freed memory, resulting in corruption. This corruption can be exploited to hijack program flow or inject code, representing a significant confidentiality, integrity, and availability risk.

Affected Systems

The vulnerability affects the PyPy distribution. Specifically, any installation of PyPy 3.11.x earlier than 3.11.16 or PyPy 3.12.x earlier than 3.12.14 is impacted. All other PyPy releases are considered unaffected until a new advisory is issued.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity. EPSS data is not available, and the issue is not listed in the CISA KEV catalog, suggesting no publicly known exploits have been reported yet. However, because the flaw requires a crafted XML document and an application using pyexpat with external entities, the attack vector is likely local or requires remote delivery of malicious XML to a vulnerable application. An attacker controlling XML input could trigger memory corruption during parsing, potentially leading to arbitrary code execution.

Generated by OpenCVE AI on September 30, 2026 at 01:44 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PyPy to version 3.11.16 or later, or 3.12.14 or later, which contain the fix for this use‑after‑free.
  • If an upgrade is not immediately possible, avoid using pyexpat’s ExternalEntityParserCreate or any other API that creates external‑entity sub‑parsers without maintaining a reference to the parent parser. Disable or sanitize XML input that may contain external entities.
  • Audit your applications to ensure they do not expose untrusted XML input to the pyexpat parser, and consider implementing input validation or using safer XML parsing libraries that do not allow external entity processing.

Generated by OpenCVE AI on September 30, 2026 at 01:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 02 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 29 Sep 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Pypy
Pypy pypy
Vendors & Products Pypy
Pypy pypy

Tue, 29 Sep 2026 13:15:00 +0000

Type Values Removed Values Added
Description 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.
Title PyPy pyexpat ExternalEntityParserCreate Use-After-Free
Weaknesses CWE-416
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}

cvssV4_0

{'score': 6.3, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-11-08T14:08:53.277Z

Reserved: 2026-08-19T21:47:08.936Z

Link: CVE-2026-76875

cve-icon Vulnrichment

Updated: 2026-10-02T12:07:26.295Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-29T13:17:52.280

Modified: 2026-10-02T13:17:55.747

Link: CVE-2026-76875

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-30T01:45:19Z

Weaknesses