Inefficient regular expression complexity in fast-xml-parser - #VU166241
Published: November 16, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service by blocking the Node.js event loop for tens of seconds.
The vulnerability exists due to quadratic-time whitespace rescanning in fast-xml-parser's scanAttributeTokens function in src/validator.js when processing an attribute section containing whitespace followed by a stray '=' without an attribute name. A remote attacker can submit XML constructed as "<a " + " ".repeat(200000) + "=>" to a service using XMLValidator.validate(xml) or new XMLParser().parse(xml, true) to exhaust processing resources.