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

Source: https://junglewise.ai/threats/cve-2026-76641-expat-out-of-bounds-read-in-xml-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-20. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

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.

## Quick answers

**Is CVE-2026-76641 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-76641 being exploited in the wild.

**How severe is CVE-2026-76641?** High severity, with a CVSS score of 7.5, published 20 August 2026.

**Which products and versions are affected?** Expat Expat through 2.8.3.

**Is there a fix for CVE-2026-76641?** A patch was published on 2026-08-20: Fix merged to libexpat master branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-76641 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-76641?** Check whether anything you run is named in the advisory. 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

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

- [https://github.com/libexpat/libexpat/commit/98599f6dcc2b460410881fe420f5f55d6bec63bf](https://github.com/libexpat/libexpat/commit/98599f6dcc2b460410881fe420f5f55d6bec63bf)
- [https://github.com/libexpat/libexpat/pull/1331](https://github.com/libexpat/libexpat/pull/1331)
