LOW · CVSS 3.1 3.7 EPSS 0.4% · 39th percentile CWE-407

CVE-2026-126066: fast-xml-parser: Quadratic CPU consumption scanning unterminated stop-node tags

Published 2026-11-10 · Updated 2026-11-10 · Also known as GHSA-474x-hrwr-fgx4

Summary

The fast-xml-parser library contains an algorithmic complexity flaw that causes excessive CPU consumption when processing specific malformed XML input. Developers using the library with the non-default stopNodes option should upgrade to version 5.12.0 or later.

Who is affected

This vulnerability affects Node.js applications that process untrusted XML data while the non-default stopNodes configuration is enabled. An attacker can trigger a denial-of-service condition by providing a malicious payload containing unterminated tag fragments, forcing the parser into quadratic execution time that blocks the event loop.

Exploitability

The vulnerability is rated as Low severity with a base score of 3.7, requiring high attack complexity to execute successfully as it relies on specific non-default configurations. Current exploit data is limited with an EPSS score of 0.005, and it is not documented as a CISA Known Exploited Vulnerability.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm fast-xml-parser >= 0, < 5.12.0 5.12.0 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Attack vectorNetwork
Attack complexityHigh
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityLow

FAQ

Is my application vulnerable by default?

No. The vulnerability specifically requires the use of the non-default stopNodes option to be exploitable.

Does this impact confidentiality or integrity?

No. The impact is limited to CPU-exhaustion (availability), and there is no evidence of impact on data confidentiality or integrity.

Is there a known public exploit?

Not documented. The report is based on static analysis, and no active exploitation is currently recorded in CISA KEV.

Original advisory description
### Summary With the non-default stopNodes option, a stop node's body with many "<a " fragments and no closing ">" anywhere after makes readStopNodeData() rescan the entire remaining input from every "<". The failed lookahead is neither cached nor bounded, so n fragments cost O(n²) before the parser throws. Availability-only (CPU exhaustion), needs the non-default stopNodes option - not benchmarked yet, see Proof of Concept. ### Details **CWE-407** - Inefficient Algorithmic Complexity **Code** - `OrderedObjParser.js:520` - `parseXml()` calls `readStopNodeData()` after a matching stop node opens - `OrderedObjParser.js:810` - calls `readTagExp()` for every non-special `<` - `OrderedObjParser.js:688-722` - `tagExpWithClosingIndex()` scans to end-of-input and returns `undefined` when no `>` exists - `OrderedObjParser.js:812-818` - on failure, `i` isn't advanced, so the next `<` repeats the same full scan - `OrderedObjParser.js:423` - the main parse loop throws immediately on the same failure; only the stop-node path retries **Root cause:** a failed closing-`>` lookahead is neither cached nor bounded - `n` copies of `<a ` with no later `>` means `n` scans over the remaining input, O(n²) work, before it finally throws. **Fix** 1. Throw immediately in `readStopNodeData()` when `readTagExp()` returns `undefined` 2. Or break the loop on the first failed scan 3. Or find the next `>` once and reuse/bound that result 4. Add a test asserting near-linear scaling when payload size doubles ### Proof of concept Not benchmarked - static-analysis finding, confidence 0.5. To confirm: configure `stopNodes` matching a root element. Build input as `'<stop>' + '<a '.repeat(n)`. Time `parse()` until it throws `Unexpected end of <tag>`. Start around n=10,000 and double it - quadratic should show ~4x time per doubling, linear ~2x. Control: same input with a `>` present, or `stopNodes` unset. ### Impact CPU-exhaustion DoS in Node.js services parsing untrusted XML with `stopNodes` enabled. A ~100KB payload is estimated at ~10⁹ character operations (roughly a second or more of blocked event loop) - analytical estimate, not a benchmark. No confidentiality/integrity impact. CVSS 3.1: `AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L` (3.7, Low).

References

Source records: GHSA-474x-hrwr-fgx4 (OSV.dev) · EPSS by FIRST, 2026-11-22.