Junglewise Threat Intelligence

CVE-2026-56405: libexpat integer overflow in getAttributeId

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

Technologies: Libexpat Project Libexpat, Libexpat Project Expat. Vendors: Libexpat Project.

Executive brief

libexpat is a widely used software library for parsing XML data. A vulnerability in how it handles attribute names could allow an attacker to cause a system crash or potentially gain unauthorized access to information. This issue affects applications that process untrusted XML files using older versions of the library.

Technical details

An integer overflow vulnerability exists in the getAttributeId function within expat/lib/xmlparse.c of libexpat. The flaw occurs during a loop that scans attribute names for a prefix colon, where a signed integer counter (i) can increment past its maximum value (INT_MAX) when processing specifically crafted, large attribute names. While the name length is typically bounded by pool block size, the post-increment operation constitutes undefined behavior at the boundary. An attacker could potentially exploit this via a local attack vector to cause a denial of service or achieve memory corruption. The issue is addressed in version 2.8.2 by guarding the counter against INT_MAX.

Affected products

  • libexpat project libexpat before 2.8.2

Timeline

  • 2026-05-29: patched: Fix merged into master branch via pull request 1251
  • 2026-06-21: disclosed: CVE published to NVD

References

Related threats