Skip to main content
Vulnerability Database/CVE-2026-113351

CVE-2026-113351: libexpat XML Parser DOS Vulnerability

CVE-2026-113351 is a denial of service flaw in libexpat versions 2.7.2 through 2.9.0 where XML_ParserReset fails to offset heap allocations. This article covers the technical details, affected versions, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-113351 Overview

CVE-2026-113351 is a denial of service vulnerability in libexpat versions 2.7.2 through 2.9.0. The flaw resides in the XML_ParserReset function, which zeroes the direct byte count but fails to offset tracked heap allocations. Attackers can submit a large XML document, and subsequent documents processed by the same reset parser fail with XML_ERROR_NO_MEMORY until the parser is recreated. The vulnerability is classified under [CWE-909: Missing Initialization of Resource]. Applications that rely on parser reuse through XML_ParserReset to amortize allocation cost are the primary targets of this issue.

Critical Impact

Remote attackers can trigger persistent parser failures on XML processing services without authentication, causing denial of service for all subsequent XML workloads on the affected parser instance.

Affected Products

  • libexpat 2.7.2
  • libexpat versions 2.7.3 through 2.8.x
  • libexpat 2.9.0

Discovery Timeline

  • 2026-10-20 - CVE-2026-113351 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-113351

Vulnerability Analysis

The vulnerability stems from incomplete state reset logic in libexpat's parser lifecycle. When XML_ParserReset is called to recycle a parser instance, it clears the direct byte counter used for billion-laughs and entity-expansion accounting. However, the function does not adjust the baseline for heap allocations already tracked against the parser. As a result, byte counts accumulated during prior parse operations persist across resets.

Once the retained accounting exceeds the parser's internal memory limit, every subsequent call that attempts to allocate from the tracked pool returns XML_ERROR_NO_MEMORY. The parser remains in this failed state indefinitely. Only destroying the instance with XML_ParserFree and creating a new one restores functionality. The flaw affects long-lived services that reuse parser instances across multiple requests to reduce overhead.

Root Cause

The reset code path in xmlparse.c resets some counters while leaving heap allocation tracking intact. See the GitHub XML Parser Source Code and the GitHub XML Parser Code Section for the specific logic that fails to offset tracked allocations during reset.

Attack Vector

An attacker submits a single large XML document to any network service that uses libexpat with parser reuse enabled. The oversized document inflates the internal allocation accounting past the configured threshold. After the service calls XML_ParserReset to prepare for the next request, every subsequent XML payload — even small, benign documents — fails with XML_ERROR_NO_MEMORY. The attack requires no authentication and persists until the application restarts or recreates the parser. See the VulnCheck Denial of Service Advisory for additional detail.

// No verified proof-of-concept code is published.
// Refer to the VulnCheck advisory for exploitation detail.

Detection Methods for CVE-2026-113351

Indicators of Compromise

  • Elevated frequency of XML_ERROR_NO_MEMORY errors in application logs following processing of a single large XML document.
  • XML parsing failures that resolve only after application restart or explicit parser recreation.
  • Inbound HTTP, SOAP, or RPC requests containing XML payloads significantly larger than typical workload baselines.

Detection Strategies

  • Instrument services that embed libexpat to emit metrics on parser error codes and alert when XML_ERROR_NO_MEMORY rates spike.
  • Inspect dependency manifests and SBOMs for libexpat versions between 2.7.2 and 2.9.0.
  • Correlate large inbound XML payloads with subsequent downstream parsing failures across the same worker process.

Monitoring Recommendations

  • Monitor request size distributions for XML endpoints and flag outliers exceeding configured limits.
  • Track process-level XML parsing success rates and alert on sustained drops after traffic bursts.
  • Log and retain source IP addresses associated with oversized XML submissions for post-incident analysis.

How to Mitigate CVE-2026-113351

Immediate Actions Required

  • Upgrade libexpat to a version containing the fix from GitHub Pull Request #1431 once released by downstream distributors.
  • Enforce strict maximum size limits on inbound XML documents at the application or reverse-proxy layer.
  • Replace XML_ParserReset reuse patterns with XML_ParserFree and XML_ParserCreate for short-lived parser lifetimes until patches are deployed.

Patch Information

The upstream fix is tracked in GitHub Pull Request #1431 against the GitHub Expat Repository. Linux distribution maintainers typically backport libexpat fixes to supported package versions; monitor vendor advisories for your distribution and update affected packages promptly.

Workarounds

  • Cap inbound XML payload size at the ingress layer to prevent allocation accounting from reaching the parser's internal threshold.
  • Recreate the parser instance after each request instead of calling XML_ParserReset.
  • Deploy a web application firewall rule that rejects XML documents above a defined byte threshold on affected endpoints.
bash
# Example nginx ingress rule capping XML request body size
client_max_body_size 1m;

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.