{"id":"GHSA-8r6m-32jq-jx6q","title":"fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits","summary":"fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits","severity":"high","cwe":["CWE-776"],"vendor":"fast-xml-parser","product":"fast-xml-parser","ecosystem":"npm","affected":["fast-xml-parser >= 5.9.3, < 5.10.1"],"patched":["fast-xml-parser 5.10.1"],"published":"2026-07-21","updated":"2026-07-21","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-8r6m-32jq-jx6q","references":[{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-8r6m-32jq-jx6q"},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/commit/4e546e03987662de5495d050b5fba26bea65383f"},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.10.1"},{"url":"https://github.com/advisories/GHSA-8r6m-32jq-jx6q"}],"tags":["ghsa","npm"],"ingestedAt":"2026-07-21T22:55:08.402Z","slug":"GHSA-8r6m-32jq-jx6q","body":"## Overview\n\n### Impact\n`fast-xml-parser` processes multiple \"DOCTYPE\" declarations within a single XML document. Each declaration passes its entities to `@nodable/entities` through `addInputEntities()`.\n\n`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.\n\nThis 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.\n\n### Workarounds\n- Manually check if multiple DOCTYPEs are not present in input contents\n- Update to v5.10.1\n- Keep `processEntity` flag off\n\n## Affected packages\n\n- `fast-xml-parser >= 5.9.3, < 5.10.1`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `fast-xml-parser 5.10.1`","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}