CVE-2026-56408: libexpat integer overflow in copyString

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

libexpat is a widely used software library for processing XML data. A flaw in how it handles memory allocation for strings could allow an attacker to cause a system crash or potentially gain unauthorized access to data. This affects any application that relies on libexpat to parse untrusted XML content.

Technologies: Libexpat Project Expat. Vendors: Libexpat Project.

Quick answers

Is CVE-2026-56408 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-56408 being exploited in the wild.
How severe is CVE-2026-56408?
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-56408?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-56408 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-56408?
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 copyString function within libexpat's xmlparse.c. The issue occurs when calculating the memory required for a string copy (charsRequired * sizeof(XML_Char)), which can overflow if the input string is sufficiently large. This can lead to an undersized memory allocation followed by a heap-based buffer overflow. An attacker could exploit this via a local vector to cause a denial of service or achieve arbitrary code execution, though the high attack complexity suggests specific conditions must be met. The vulnerability is addressed in version 2.8.2 by adding a check against SIZE_MAX.

Affected products

  • libexpat project libexpat before 2.8.2

Timeline

  • 2026-06-21: disclosed
  • 2026-06-21: advisory

References

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