GitHub Advisoryadvisory · npm
GHSA-8r6m-32jq-jx6q fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits
HIGH
Official page ↗
- Aliases
- CVE-2026-73569
- Ecosystem
- npm
- Packages
- fast-xml-parser
- Severity
- High
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- Weaknesses
- CWE-776
- Reviewed
- 2026-07-21
Affected packages
• npm fast-xml-parser: >= 5.9.3, < 5.10.1 → fixed in 5.10.1
Description
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
Related
Alias · CVE (1)
- CVE-2026-73569 fast-xml-parser allows users to process XML from JS object without C/C++ based libraries or callbacks. vulnerability
Weakness · CWE (1)
- CWE-776 Improper Restriction of Recursive Entity References in DTDs weakness
References
- https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-8r6m-32jq-jx6q web
- https://github.com/NaturalIntelligence/fast-xml-parser/commit/4e546e03987662de5495d050b5fba26bea65383f web
- https://github.com/NaturalIntelligence/fast-xml-parser package
- https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.10.1 web