Skip to content
Heist/ feed
Back to feed
Medium

PyPy pyexpat ExternalEntityParserCreate Use-After-Free

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-76875
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 03:52 UTC · Revision 1

Source evidence

PyPy pyexpat ExternalEntityParserCreate Use-After-Free

core-osv · Original source

Published 29 Sept 2026, 12:45 UTC

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.

osv:CVE-2026-76875
Complete source record
{
  "id": "565b6e240fba1daa1e2cce22268af0e279fde84df4bf9a55cdc89123af9f3f52",
  "url": "https://osv.dev/vulnerability/CVE-2026-76875",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "PyPy pyexpat ExternalEntityParserCreate Use-After-Free",
    "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.",
    "evidence": "osv:CVE-2026-76875",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-76875",
      "aliases": [
        "CVE-2026-76875"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pypy/pypy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e778e9989a677fe281a9e2ae3447e213afcc875c"
                },
                {
                  "fixed": "78565394c9b55004add6156e0cc6d32eaf63dcc8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "e778e9989a677fe281a9e2ae3447e213afcc875c"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "release-pypy3.12-v8.0.0"
                  },
                  {
                    "range": [
                      {
                        "fixed": "78565394c9b55004add6156e0cc6d32eaf63dcc8"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "release-pypy3.11-v8.0.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "release-1.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-76875.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.155841028Z",
      "provider": "osv",
      "references": [
        "https://doc.pypy.org/release-v8.0.0.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76875.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-76875",
        "https://www.vulncheck.com/advisories/pypy-pyexpat-externalentityparsercreate-use-after-free",
        "https://github.com/pypy/pypy/releases/tag/release-pypy3.11-v8.0.0",
        "https://github.com/pypy/pypy/releases/tag/release-pypy3.12-v8.0.0",
        "https://github.com/pypy/pypy"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-416"
        ],
        "cna_assigner": "VulnCheck",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "3.11.16"
                  },
                  {
                    "introduced": "3.12.0"
                  },
                  {
                    "fixed": "3.12.14"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "3.11.16"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76875.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-76875",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 510023,
  "published_at": "2026-09-29T12:45:19.797+00:00"
}