Summary
fast-xml-parser: Quadratic CPU consumption scanning unterminated stop-node tags
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()callsreadStopNodeData()after a matching stop node opensOrderedObjParser.js:810, callsreadTagExp()for every non-special<OrderedObjParser.js:688-722,tagExpWithClosingIndex()scans to end-of-input and returnsundefinedwhen no>existsOrderedObjParser.js:812-818, on failure,iisn't advanced, so the next<repeats the same full scanOrderedObjParser.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
- Throw immediately in
readStopNodeData()whenreadTagExp()returnsundefined - Or break the loop on the first failed scan
- Or find the next
>once and reuse/bound that result - 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).
CVE-2026-126066 has a CVSS score of 3.7 (Low). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.12.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-126066? CVE-2026-126066 is a low-severity security vulnerability in fast-xml-parser (npm), affecting versions <= 5.11.2. It is fixed in 5.12.0.
- How severe is CVE-2026-126066? CVE-2026-126066 has a CVSS score of 3.7 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of fast-xml-parser are affected by CVE-2026-126066? fast-xml-parser (npm) versions <= 5.11.2 is affected.
- Is there a fix for CVE-2026-126066? Yes. CVE-2026-126066 is fixed in 5.12.0. Upgrade to this version or later.
- Is CVE-2026-126066 exploitable, and should I be worried? Whether CVE-2026-126066 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-126066 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-126066? Upgrade
fast-xml-parserto 5.12.0 or later.