Junglewise Threat Intelligence

CVE-2026-76956: libexpat hash flooding denial of service via mishandled entropy generation

CVE-2026-76956 · Severity: medium · CVSS 5.9 · Published 2026-08-20

Technologies: Libexpat Project Libexpat. Vendors: Libexpat Project.

Executive brief

libexpat is an XML parsing library used in many applications to process XML documents. A logic error in the library's random number generation causes it to fall back to weak entropy sources when processing XML, making the parser vulnerable to hash flooding attacks. An attacker can craft malicious XML content that causes excessive CPU consumption and application slowdown or crash.

Technical details

The vulnerability stems from an inverted return code check in the writeRandomBytes_getentropy() function. The getentropy() system call returns 0 on success, but the code stores this return value directly into a bool variable, inverting the logic—a successful entropy read is treated as a failure. Consequently, legitimate entropy is discarded and the salt generation falls back to weaker time+pid-based randomization. Additionally, the failure path uses an uninitialized buffer. An attacker can exploit this by sending specially crafted XML content that triggers hash collisions in the parser's internal hash tables, causing denial of service. The fix was merged into libexpat 2.8.4, released on or about August 31, 2026; versions 2.8.2 and 2.8.3 are affected.

Affected products

  • libexpat libexpat 2.8.2, 2.8.3

Timeline

  • 2026-08-20: disclosed
  • 2026-08-31: patched: Fixed in libexpat 2.8.4

References

Related threats