<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fast-Xml-Parser (&gt;= 5.9.3, &lt; 5.10.1) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/fast-xml-parser--5.9.3--5.10.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 21 Jul 2026 22:08:29 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/fast-xml-parser--5.9.3--5.10.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>fast-xml-parser: Repeated DOCTYPE Declarations Bypass Entity Expansion Limits Leading to DoS</title><link>https://feed.craftedsignal.io/briefs/2026-07-fast-xml-parser-dos/</link><pubDate>Tue, 21 Jul 2026 22:08:29 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-fast-xml-parser-dos/</guid><description>A vulnerability in fast-xml-parser allows an attacker to bypass entity expansion limits by crafting XML documents with multiple DOCTYPE declarations, leading to excessive CPU usage, memory exhaustion, and denial of service.</description><content:encoded><![CDATA[<p>A critical vulnerability (tracked as GHSA-8r6m-32jq-jx6q) in the <code>fast-xml-parser</code> library, versions greater than or equal to 5.9.3 and less than 5.10.1, allows attackers to trigger a denial of service (DoS) by crafting malicious XML documents. The library improperly handles multiple <code>DOCTYPE</code> declarations within a single XML document. Each <code>DOCTYPE</code> declaration processes its entities through <code>@nodable/entities</code>' <code>addInputEntities()</code> function, which unexpectedly resets the entity expansion counters (<code>maxTotalExpansions</code> and <code>maxExpandedLength</code>) each time it is called. This design flaw enables an attacker to repeatedly reset these limits, allowing a crafted XML document to consume excessive system resources, leading to high CPU utilization, event-loop blocking, severe memory exhaustion, and ultimately process termination. This vulnerability has been present in affected versions since 5.9.3 and impacts any application or service utilizing the vulnerable <code>fast-xml-parser</code> library.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious XML document containing multiple <code>DOCTYPE</code> declarations.</li>
<li>The crafted XML document is supplied as input to a system or application utilizing the vulnerable <code>fast-xml-parser</code> library (versions &gt;= 5.9.3, &lt; 5.10.1).</li>
<li>The <code>fast-xml-parser</code> library begins parsing the XML document.</li>
<li>Upon encountering each <code>DOCTYPE</code> declaration, the parser passes its entities to the <code>@nodable/entities</code> library, which calls <code>addInputEntities()</code>.</li>
<li>The <code>addInputEntities()</code> function, when called multiple times, unexpectedly resets internal entity expansion counters (e.g., <code>maxTotalExpansions</code>, <code>maxExpandedLength</code>).</li>
<li>Due to the repeated resets, the attacker's crafted XML document can exceed the configured entity-expansion limits that would normally prevent resource exhaustion.</li>
<li>The parsing process consumes excessive CPU cycles and memory.</li>
<li>The host system experiences event-loop blocking, memory exhaustion, and eventually the application process terminates, resulting in a denial of service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability leads to a denial of service (DoS) condition on the affected system or application. An attacker can cause excessive CPU utilization, block the event loop, exhaust available memory, and force the termination of the parsing process or the entire application. This can lead to significant service disruptions, system instability, and potential data loss if the application cannot recover gracefully. While specific victim counts are not available, any organization using vulnerable versions of <code>fast-xml-parser</code> in their web applications, APIs, or backend services is susceptible to this attack, with potential impact on critical business operations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Update <code>fast-xml-parser</code> to version 5.10.1 or later to patch the vulnerability.</li>
<li>Manually implement input validation to check for and reject XML documents containing multiple <code>DOCTYPE</code> declarations, especially if immediate patching is not possible.</li>
<li>Ensure the <code>processEntity</code> flag in <code>fast-xml-parser</code> configurations is kept off (default behavior) to reduce exposure, though this is not a complete mitigation for this specific vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>vulnerability-exploitation</category><category>software-supply-chain</category></item></channel></rss>