Junglewise Threat Intelligence

CVE-2026-76641: Expat out-of-bounds read in XML parser

CVE-2026-76641 · Severity: high · CVSS 7.5 · Published 2026-08-20

Technologies: Expat.

Executive brief

Expat, a widely-used XML parsing library, contains a memory safety defect that can be triggered when processing specially crafted XML documents using external entity parsers. An attacker can exploit this vulnerability to cause application crashes (denial of service) or potentially corrupt memory, affecting any application that uses Expat for XML processing—including web browsers, document handlers, and server applications.

Technical details

The vulnerability is an out-of-bounds read in the dtdCopy function caused by a struct size mismatch. When ELEMENT_TYPE member .defaultAttForName was enlarged from NAMED to NAME_AND_DEFAULT_ATTRIBUTE, the dtdCopy function was not updated to allocate the correct size for copied entries; it continues allocating sizeof(NAMED) instead of the larger size. When a parser created via XML_ExternalEntityParserCreate parses attributes, the storeAtts function reads the .attIndex member past allocated memory, yielding a wild value that is then dereferenced as a pointer into .defaultAtts, causing either attribute normalization to be silently skipped or a segmentation fault. The vulnerability requires processing XML input through an external entity parser but does not require authentication or user interaction. A fix has been merged to the Expat master branch as of August 2026.

Affected products

  • Expat Expat through 2.8.3

Timeline

  • 2026-08-20: disclosed: CVE-2026-76641 published
  • 2026-08-20: patched: Fix merged to libexpat master branch

References