Vulnerability GHSA-8r6m-32jq-jx6q

High Risk
HIGH RISK
CVSS Score: 8.0
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
3 months ago
July 21, 2026 at 10:06 PM UTC
fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits
>=5.9.3 <5.10.1
>=5.9.3 <5.10.1

Summary

fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits

Details

Impact

fast-xml-parser processes multiple "DOCTYPE" declarations within a single XML document. Each declaration passes its entities to @nodable/entities through addInputEntities().

addInputEntities() resets the entity expansion counters every time it is called. An attacker can therefore insert additional DOCTYPE declarations to repeatedly reset maxTotalExpansions and maxExpandedLength during one parse operation.

This allows a crafted XML document to exceed the configured entity-expansion limits and can cause excessive CPU use, event-loop blocking, memory exhaustion, and process termination.

Workarounds

  • Manually check if multiple DOCTYPEs are not present in input contents
  • Update to v5.10.1
  • Keep processEntity flag off

Impacted packages

Timeline

Published
3 months ago
July 21, 2026 at 10:06 PM UTC
Fixed (5.10.1)
3 months ago
July 16, 2026 at 05:17 AM UTC
Last Modified
2 months ago
September 10, 2026 at 03:51 AM UTC