# CVE-2026-56406: libexpat integer overflow in XML_ParseBuffer

Source: https://junglewise.ai/threats/cve-2026-56406-libexpat-integer-overflow-in-xml-parsebuffer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-21. Updated: 2026-06-21  
License: CC BY 4.0 with a link back

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

libexpat is a widely used software library for processing XML data in various applications and operating systems. A flaw in how it handles data buffers could allow an attacker to cause an integer overflow, potentially leading to unauthorized data access or system instability. This issue is particularly relevant for software that processes untrusted XML input using specific internal functions.

Technologies: [Libexpat Project Expat](https://junglewise.ai/threats/technologies/expat). Vendors: [Libexpat Project](https://junglewise.ai/threats/vendors/libexpat-project).

## Quick answers

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

**How severe is CVE-2026-56406?** 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-56406?** A patch was published on 2026-05-31: Fix merged into libexpat master branch via pull request 1255 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-56406 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-56406?** 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 libexpat versions prior to 2.8.2 within the XML_ParseBuffer function. The root cause is a missing safety check for buffer indices that was already implemented in the related XML_Parse function. An attacker could exploit this by providing specially crafted XML input to an application using the vulnerable function, potentially leading to memory corruption, information disclosure, or a denial-of-service condition. The attack vector is local with high complexity, as it requires the target application to utilize the specific XML_ParseBuffer API in a way that triggers the overflow. The issue has been addressed in version 2.8.2.

## Affected products

- libexpat project libexpat before 2.8.2

## Timeline

- 2026-05-31: patched: Fix merged into libexpat master branch via pull request 1255
- 2026-06-21: disclosed: CVE-2026-56406 published

## References

- [https://github.com/libexpat/libexpat/pull/1255](https://github.com/libexpat/libexpat/pull/1255)

## Related threats

- [libexpat use-after-free in doCdataSection](https://junglewise.ai/threats/cve-2026-56412-libexpat-use-after-free-in-docdatasection)
- [libexpat integer overflow in xmlwf endDoctypeDecl](https://junglewise.ai/threats/cve-2026-56411-libexpat-integer-overflow-in-xmlwf-enddoctypedecl)
- [libexpat xmlwf integer overflow in resolveSystemId](https://junglewise.ai/threats/cve-2026-56410-libexpat-xmlwf-integer-overflow-in-resolvesystemid)
- [libexpat xmlwf integer overflow in output filename handling](https://junglewise.ai/threats/cve-2026-56409-libexpat-xmlwf-integer-overflow-in-output-filename-handling)
- [libexpat integer overflow in copyString](https://junglewise.ai/threats/cve-2026-56408-libexpat-integer-overflow-in-copystring)
