CVE-2026-56411: libexpat integer overflow in xmlwf endDoctypeDecl

CVE-2026-56411 · Severity: medium · CVSS 6.9 · Published 2026-06-21

A vulnerability exists in libexpat, a widely used library for parsing XML data. An attacker could provide a specially crafted XML file that causes the software to miscalculate memory requirements, potentially leading to a system crash or unauthorized data access. This affects applications that use the xmlwf tool to process untrusted XML documents.

Technologies: Libexpat Project Expat. Vendors: Libexpat Project.

Quick answers

Is CVE-2026-56411 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-56411 being exploited in the wild.
How severe is CVE-2026-56411?
Medium severity, with a CVSS score of 6.9, published 21 June 2026.
Which products and versions are affected?
Libexpat Project Expat before 2.8.2.
Is there a fix for CVE-2026-56411?
A patch was published on 2026-06-03: Fix merged into master branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-56411 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-56411?
Check whether you run Libexpat Project Expat at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An integer overflow vulnerability exists in the xmlwf utility of libexpat within the endDoctypeDecl() function. The root cause is the use of a plain integer to count NOTATION declarations from a Document Type Definition (DTD), followed by a memory allocation (malloc) that multiplies this count by the size of a pointer without overflow guards. On 32-bit systems, this multiplication can wrap around, leading to a heap-based buffer under-allocation. A subsequent loop that populates this buffer can then result in a heap buffer overflow. The vulnerability is addressed in version 2.8.2 by switching the counter to size_t and implementing proper overflow checks.

Affected products

  • libexpat project libexpat before 2.8.2

Timeline

  • 2026-06-02: disclosed: Vulnerability details shared in pull request
  • 2026-06-03: patched: Fix merged into master branch
  • 2026-06-21: advisory: CVE-2026-56411 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.