All vulnerabilities

npm

CVE-2026-141469

fast-xml-parser: Quadratic-time (ReDoS-class) denial of service in XMLValidator attribute scanner, default options

Severity
Medium 5.3
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
5.12.1
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)Uncontrolled resource consumption (CWE-400)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-7cfw-w2rf-f3jc
Sources
OSV.dev and GitHub

Description

Reported by Nikhil Agrawal, Mettle Labs; reproduced only against a clean local install of [email protected] on their own machine. scanAttributeTokens in src/validator.js rescans a leading-whitespace run on every loop iteration when it hits a stray =, giving Theta(n^2) time. A few-hundred-KB input stalls the event loop for tens of seconds. Reachable on the default path via both XMLValidator.validate(xml) and new XMLParser().parse(xml, true), no non-default options.

src/validator.js, scanAttributeTokens — on a = with no attribute name before it, i is reset to one past the token start, not past the =, so the leading-whitespace scan repeats:

For an attribute string of the shape =, each outer iteration advances tokenStart by one but re-walks the entire remaining whitespace run up to the =, so total work is quadratic in the run length.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
fast-xml-parsernpm · osv:npm:fast-xml-parser
  • Every version before 5.12.1

About fast-xml-parser

Weekly downloads (npm)
104,711,693npm, 1 Dec 2026

Vulnerabilities in fast-xml-parser

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
0
Known exploited
0
Search the list for fast-xml-parser

References