fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits
The fast-xml-parser library versions 5.9.3 up to but not including 5.10.1 have a vulnerability where multiple DOCTYPE declarations in a single XML document reset entity expansion limits. This allows crafted XML inputs to bypass configured limits on entity expansion, potentially causing excessive CPU usage, event-loop blocking, memory exhaustion, and process termination.
AI Analysis
Technical Summary
fast-xml-parser processes multiple DOCTYPE declarations within one XML document, passing each declaration's entities to @nodable/entities via addInputEntities(). The addInputEntities() function resets entity expansion counters each time it is called, enabling an attacker to repeatedly reset maxTotalExpansions and maxExpandedLength during a single parse operation. This flaw permits crafted XML documents to exceed entity-expansion limits, leading to resource exhaustion and denial of service conditions. The vulnerability affects versions >=5.9.3 and <5.10.1 of fast-xml-parser.
Potential Impact
An attacker can craft XML documents with multiple DOCTYPE declarations to bypass entity expansion limits, causing excessive CPU consumption, blocking the event loop, exhausting memory, and potentially terminating the process. This results in denial of service against applications using affected versions of fast-xml-parser.
Mitigation Recommendations
A fix is available in fast-xml-parser version 5.10.1. Users should update to version 5.10.1 or later. Alternatively, manually ensure input XML does not contain multiple DOCTYPE declarations or keep the processEntity flag disabled to mitigate the issue.
fast-xml-parser: Repeated DOCTYPE declarations reset entity expansion limits
Description
The fast-xml-parser library versions 5.9.3 up to but not including 5.10.1 have a vulnerability where multiple DOCTYPE declarations in a single XML document reset entity expansion limits. This allows crafted XML inputs to bypass configured limits on entity expansion, potentially causing excessive CPU usage, event-loop blocking, memory exhaustion, and process termination.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
fast-xml-parser processes multiple DOCTYPE declarations within one XML document, passing each declaration's entities to @nodable/entities via addInputEntities(). The addInputEntities() function resets entity expansion counters each time it is called, enabling an attacker to repeatedly reset maxTotalExpansions and maxExpandedLength during a single parse operation. This flaw permits crafted XML documents to exceed entity-expansion limits, leading to resource exhaustion and denial of service conditions. The vulnerability affects versions >=5.9.3 and <5.10.1 of fast-xml-parser.
Potential Impact
An attacker can craft XML documents with multiple DOCTYPE declarations to bypass entity expansion limits, causing excessive CPU consumption, blocking the event loop, exhausting memory, and potentially terminating the process. This results in denial of service against applications using affected versions of fast-xml-parser.
Mitigation Recommendations
A fix is available in fast-xml-parser version 5.10.1. Users should update to version 5.10.1 or later. Alternatively, manually ensure input XML does not contain multiple DOCTYPE declarations or keep the processEntity flag disabled to mitigate the issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-8r6m-32jq-jx6q
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a600a9d9c2644c7f8fdeeb4
Added to database: 07/22/2026, 00:11:09 UTC
Last enriched: 07/22/2026, 00:37:06 UTC
Last updated: 07/22/2026, 00:37:06 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.