MEDIUMCVSS v3.1 5.3Vulnerability

CVE-2026-141469

### Summary 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. ### Details `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: ```js function scanAttributeTokens(attrStr) { const tokens = []; const len = attrStr.length; let i = 0; while (i < len) { const tokenStart = i; // Leading whitespace before the name. while (i < len && isWhiteSpace(attrStr[i])) i++; if (i >= len) break; if (attrStr[i] === '=') { // No name before this '=' — not a valid attribute start. i = tokenStart + 1; // <-- rewinds to tokenStart+1, NOT past the '=' -> re-scans the whitespace continue; } ... ``` For an attribute string of the shape `<whitespace run> =`, 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. It is reached whenever an element's attribute section is scanned, which both `XMLValidator.validate()` and `XMLParser.parse(xml, true)` (validation enabled) do on the default path. (This scanner is a recent regex -> hand-scanner rewrite; the quadratic rescan is in the rewrite.) ### Proof of concept A few-hundred-KB document hangs the validator. Runnable against a clean `npm i [email protected]` (Node >= 18): ```js // poc-fxp-quadratic.mjs import { XMLValidator, XMLParser } from "fast-xml-parser"; for (const n of [20000, 40000, 80000, 160000]) {

Properties

Summary
fast-xml-parser: Quadratic-time (ReDoS-class) denial of service in XMLValidator attribute scanner, default options
Severity
medium
Nvd fetched at
2026-12-02T06:37:54.190518+00:00
Cvss score
5.3
Cvss severity
MEDIUM
Retrieved at
2026-12-02T06:39:20+00:00
Ghsa published
2026-12-01T23:35:22Z
Source url
https://github.com/advisories/GHSA-7cfw-w2rf-f3jc
Ghsa updated
2026-12-01T23:35:25Z
Ghsa id
GHSA-7cfw-w2rf-f3jc
Last source
GitHub Advisory Database
Score
5.3
Cvss version
3.1
Cve id
CVE-2026-141469
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
First seen by Signal
2026-12-01T22:36:00+00:00
Name
CVE-2026-141469
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Published at
2026-12-01T21:17:10.530

Related Entities (4)

AFFECTS (1)

→[Software]npm/fast-xml-parser

VULNERABLE_TO (1)

←[Software]npm/fast-xml-parser

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-141469 (CVSS v3.1 5.3) — Ninja Signal Threat Intelligence | Ninja Signal