Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') Affecting fast-xml-parser package, versions >=5.9.3 <5.10.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTXMLPARSER-18170229
  • published22 Jul 2026
  • disclosed21 Jul 2026
  • creditCharles Vosburgh

Introduced: 21 Jul 2026

New CVE NOT AVAILABLE CWE-776  (opens in a new tab)

How to fix?

Upgrade fast-xml-parser to version 5.10.1 or higher.

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') via the addInputEntities function. An attacker can cause excessive CPU usage, event-loop blocking, memory exhaustion, and process termination by crafting an XML document with repeated DOCTYPE declarations that reset entity expansion limits.

Workaround

This vulnerability can be mitigated by manually checking that multiple DOCTYPE declarations are not present in input contents or by keeping the processEntity flag off.

CVSS Base Scores

version 4.0
version 3.1