---
id: "CVE-2026-115506"
kind: "vulnerability"
aliases: ["CVE-2026-115506"]
title: "libexpat: late billion-laughs check lets XML cause long CPU stalls"
severity: "high"
cvss: 8.7
epss: 0.0035
exploited: false
status: "open"
category: "infrastructure"
products: [{"name": "libexpat", "fixed": [], "affected": "<= 2.9.0", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["infrastructure", "libexpat", "perl", "php", "python", "self-hosted"]
not_affected_if: ["dtd-disabled", "no-untrusted-xml", "no-untrusted-xml-input"]
published_at: "2026-10-22T20:17:06+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-24T07:15:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115506", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-10-23T23:38:46+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-115506", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# libexpat: late billion-laughs check lets XML cause long CPU stalls

libexpat through 2.9.0 detects billion-laughs entity amplification too late (accountingDiffTolerated in xmlparse.c). A ~12 MB DTD with nested entities costs about 47 s CPU per parse, so any service parsing untrusted XML with DTDs can be stalled remotely (CVSS 3.1 7.5, v4 8.7). Fix (precomputing expanded entity sizes) is merged upstream on 2026-10-23 but not yet in a release.

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

## Affected

- vendor:libexpat affected <= 2.9.0 fixed ?

## How to check

Find the libexpat version in use: 'expat --version' / 'xmlwf -v', 'pkg-config --modversion expat', or 'python3 -c "import pyexpat; print(pyexpat.EXPAT_VERSION)"'. Any version <= 2.9.0 is affected. Also check bundled copies (Python, PHP, Perl XML::Parser, Apache, Firefox, etc.) and your distro's advisory. Only exposed if you parse untrusted XML with DTD/entity processing enabled.

## Fix

No released fix yet. Upstream fix is PR #1433 (merge commit c30145b2), expected in Expat 2.10.0 (planned 2026-11-02). Until then: reject or disable DTDs/entity expansion for untrusted XML (e.g. defusedxml in Python), cap input size and parse CPU time/timeouts, or backport the patch if your distro ships one. Move to 2.10.0 or a distro patched build when available.

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115506
- 2026-10-23T23:38:46+00:00 analyst — CVE record + libexpat PR #1433: fix merged to master 2026-10-23 but NO released version yet; Expat 2.10.0 planned ETA 2026-11-02 (issue #1416, per PR timeline). 2.9.0 is latest release and affected. No in-the-wild exploitation found; finder Hanno Böck's fuzzer is public (not a ready PoC). Did not search social posts. Follow-up PRs #1436/#1439 touch the fix, so check 2.10.0 notes.
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-115506

## Documents

- [advisory] CVE record CVE-2026-115506 https://www.cve.org/CVERecord?id=CVE-2026-115506
- [describes] libexpat Changes (latest release 2.9.0) https://github.com/libexpat/libexpat/blob/master/expat/Changes
- [fix] libexpat PR #1433: Precompute entity expanded sizes (fix, merged 2026-10-23) https://github.com/libexpat/libexpat/pull/1433
- [poc] hannob/lololol: billion laughs mutator/fuzzer (finder's tool) https://github.com/hannob/lololol

## From the sources

libexpat through 2.9.0 contains a denial of service vulnerability because billion laughs protection in accountingDiffTolerated() in xmlparse.c detects entity amplification too late. Attackers can supply a moderately sized XML document with a large DTD and nested entity expansions to consume tens of seconds of CPU per parse.

---

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