CVE-2026-141469: fast-xml-parser: quadratic-time (ReDoS-class) denial of service in XMLValidator attribute scanner, default options
fast-xml-parser allows users to process XML from JS object without C/C++ based libraries or callbacks. Prior to version 5.12.1, scanAttributeTokens in src/validator.js resets its cursor to one position after the token start when a leading-whitespace run ends in a stray equals sign. Each loop iteration rescans most of the remaining whitespace, producing quadratic processing time for attacker-controlled XML. The default path is reachable through XMLValidator.validate(xml) and through new XMLParser().parse(xml, true) when validation is enabled, allowing a document of a few hundred kilobytes to block the Node.js event loop for tens of seconds and deny service. This issue affects availability only. This issue is fixed in version 5.12.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/fast-xml-parserto a version that resolves this vulnerability.Fixed in 5.12.1
Event History
Frequently Asked Questions
Which applications are exposed to this denial-of-service condition?
Applications using fast-xml-parser versions before 5.12.1 are exposed when they validate attacker-controlled XML through XMLValidator.validate(xml) or enable validation with new XMLParser().parse(xml, true). The affected behavior is reachable with default options.
What must an attacker provide to trigger the issue?
An attacker needs to supply crafted XML containing a leading-whitespace run followed by a stray equals sign in the attribute scanner. No authentication or user interaction is required according to the supplied vector.
What is the operational impact?
Processing a document of a few hundred kilobytes can block the Node.js event loop for tens of seconds because the scanner performs quadratic rescanning. The reported impact is availability only; confidentiality and integrity are not affected.
How can the issue be remediated?
Upgrade fast-xml-parser to version 5.12.1, which contains the fix.