---
id: "CVE-2026-113351"
kind: "vulnerability"
aliases: ["CVE-2026-113351"]
title: "libexpat: parser reset leaks memory accounting, later XML parses fail"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["c", "infrastructure", "libexpat", "python", "self-hosted"]
not_affected_if: ["fresh-parser-per-document", "no-untrusted-xml"]
published_at: "2026-10-20T11:17:19+00:00"
first_seen_at: "2026-10-23T21:57:20+00:00"
updated_at: "2026-10-25T03:04:14+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113351", "first_seen_at": "2026-10-23T21:57:20+00:00"}]
---

# libexpat: parser reset leaks memory accounting, later XML parses fail

libexpat versions 2.7.2 through 2.9.0 fail to reset a parser's heap accounting in XML_ParserReset, so a large XML document leaves the reset parser unable to allocate memory. Later documents parsed on that same parser fail with XML_ERROR_NO_MEMORY until the parser is recreated, which is a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `xmllint --version` or check the bundled expat version with `pkg-config --modversion expat` on Linux systems
- Search your dependencies for libexpat, for example `ldd` output on binaries or the expat package in your OS package manager
- Look for code that calls XML_ParserReset and reuses one parser across many documents, unknown otherwise

## Fix

- Upgrade libexpat to a release later than `2.9.0` once your OS or vendor ships it, the exact fixed version is unknown from the sources
- Until patched, recreate the parser instead of reusing it with XML_ParserReset after large documents

## Timeline

- 2026-10-23T21:57:20+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-113351

## From the sources

libexpat 2.7.2 through 2.9.0 contains a denial of service vulnerability because XML_ParserReset zeroes the direct byte count but never offsets tracked heap allocations. Attackers can submit a large XML document so later documents on the same reset parser fail with XML_ERROR_NO_MEMORY until it is recreated.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
