CVE-2026-32777: libexpat infinite loop in entityValueProcessor during DTD parsing

CVE-2026-32777 · Severity: medium · CVSS 4 · Published 2026-03-16

libexpat is a widely used software library for processing XML data. A vulnerability in how it handles certain document structures can cause the software to enter an infinite loop, leading to a system hang or service outage. This affects various products that embed the library, including certain Siemens industrial controllers, potentially impacting operational availability.

Technologies: Libexpat Project Expat, Libexpat Project Libexpat, Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP. Vendors: Libexpat Project, Siemens.

Quick answers

Is CVE-2026-32777 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-32777 being exploited in the wild.
How severe is CVE-2026-32777?
Medium severity, with a CVSS score of 4, published 16 March 2026.
Which products and versions are affected?
Libexpat Project Expat versions before 2.7.5; Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5 before V3.1.6.
Is there a fix for CVE-2026-32777?
A patch was published on 2026-03-16: Fix merged into libexpat master branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-32777 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-32777?
Check whether you run Libexpat Project Expat, Libexpat Project Libexpat or Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP 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

A vulnerability exists in libexpat's entityValueProcessor function where the parser can enter an infinite loop. This occurs because the XmlPrologTok function may repeatedly return XML_TOK_INSTANCE_START without advancing the internal pointer, causing the processor to stall. An attacker providing a malicious XML document with specific DTD content can trigger this condition to cause a denial of service (DoS). The issue was identified via OSS-Fuzz and is fixed in version 2.7.5 by implementing proper token validation similar to entityValueInitProcessor. Downstream products, such as Siemens SIMATIC S7-1500 CPUs, are also affected and require firmware updates.

Affected products

  • libexpat project libexpat versions before 2.7.5
  • Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5 before V3.1.6

Timeline

  • 2026-03-06: disclosed: Issue reported via OSS-Fuzz/ClusterFuzz finding 486993411
  • 2026-03-16: patched: Fix merged into libexpat master branch
  • 2026-03-16: advisory: CVE-2026-32777 published

References

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