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

Source: https://junglewise.ai/threats/cve-2026-32777-libexpat-infinite-loop-in-entityvalueprocessor-during-dtd-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-16. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/expat), [Libexpat Project Libexpat](https://junglewise.ai/threats/technologies/libexpat), [Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP](https://junglewise.ai/threats/technologies/simatic-s7-1500-cpu-1518-4-pn-dp-mfp). Vendors: [Libexpat Project](https://junglewise.ai/threats/vendors/libexpat-project), [Siemens](https://junglewise.ai/threats/vendors/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

- [https://github.com/libexpat/libexpat/issues/1161](https://github.com/libexpat/libexpat/issues/1161)
- [https://github.com/libexpat/libexpat/pull/1159](https://github.com/libexpat/libexpat/pull/1159)
- [https://github.com/libexpat/libexpat/pull/1162](https://github.com/libexpat/libexpat/pull/1162)
- [https://issues.oss-fuzz.com/issues/486993411](https://issues.oss-fuzz.com/issues/486993411)
- [https://cert-portal.siemens.com/productcert/html/ssa-082556.html](https://cert-portal.siemens.com/productcert/html/ssa-082556.html)

## Related threats

- [libexpat use-after-free in custom encoding callbacks](https://junglewise.ai/threats/cve-2026-76957-libexpat-use-after-free-in-custom-encoding-callbacks)
- [libexpat hash flooding denial of service via mishandled entropy generation](https://junglewise.ai/threats/cve-2026-76956-libexpat-hash-flooding-denial-of-service-via-mishandled-entropy)
- [Expat XML parser denial of service via quadratic complexity](https://junglewise.ai/threats/cve-2026-66046-expat-xml-parser-denial-of-service-via-quadratic-complexity)
- [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)
