CVE-2026-76875: PyPy pyexpat ExternalEntityParserCreate Use-After-Free

Published Sep 29, 2026
·
Updated

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

1 affected component
Pypy Pypy<3.11.16, <3.12.14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PyPy to a version that resolves this vulnerability.

    Fixed in 3.11.16
  2. Upgrade

    Upgrade PyPy to a version that resolves this vulnerability.

    Fixed in 3.12.14

Event History

Sep 29, 2026
CVE Published
via MITRE·12:45 PM
Data Sourced
via MITRE·12:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications running affected PyPy versions are exposed if they parse attacker-controlled XML, create external-entity sub-parsers through pyexpat's ExternalEntityParserCreate, and do not retain a reference to the parent parser.

2

What does an attacker need to exploit the vulnerability?

An attacker needs to supply a crafted XML document to a vulnerable application. No authentication or user interaction is required according to the supplied severity vector.

3

Are all pyexpat XML parsing uses affected?

No. The described condition requires use of ExternalEntityParserCreate to create an external-entity child parser without keeping the parent parser referenced; the available information does not indicate that ordinary pyexpat parsing alone is affected.

4

How can I determine whether my application may already be vulnerable?

Check whether it runs PyPy before 3.11.16 or 3.12.14, uses pyexpat, and calls ExternalEntityParserCreate. Review parser lifetime handling to determine whether a child external-entity parser can continue parsing after the parent parser reference is no longer retained.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203