GHSA-474X-HRWR-FGX4
Vulnerability from github – Published: 2026-11-10 21:09 – Updated: 2026-11-10 21:09Summary
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).
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.11.2"
},
"package": {
"ecosystem": "npm",
"name": "fast-xml-parser"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.12.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-126066"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-10T21:09:44Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Summary\n\nWith the non-default stopNodes option, a stop node\u0027s body with many \"\u003ca \" fragments and no closing \"\u003e\" anywhere after makes readStopNodeData() rescan the entire remaining input from every \"\u003c\". The failed lookahead is neither cached nor bounded, so n fragments cost O(n\u00b2) before the parser throws. Availability-only (CPU exhaustion), needs the non-default stopNodes option \u2014 not benchmarked yet, see Proof of Concept.\n\n### Details\n\n**CWE-407** \u2014 Inefficient Algorithmic Complexity\n\n**Code**\n- `OrderedObjParser.js:520` \u2014 `parseXml()` calls `readStopNodeData()` after a matching stop node opens\n- `OrderedObjParser.js:810` \u2014 calls `readTagExp()` for every non-special `\u003c`\n- `OrderedObjParser.js:688-722` \u2014 `tagExpWithClosingIndex()` scans to end-of-input and returns `undefined` when no `\u003e` exists\n- `OrderedObjParser.js:812-818` \u2014 on failure, `i` isn\u0027t advanced, so the next `\u003c` repeats the same full scan\n- `OrderedObjParser.js:423` \u2014 the main parse loop throws immediately on the same failure; only the stop-node path retries\n\n**Root cause:** a failed closing-`\u003e` lookahead is neither cached nor bounded \u2014 `n` copies of `\u003ca ` with no later `\u003e` means `n` scans over the remaining input, O(n\u00b2) work, before it finally throws.\n\n**Fix**\n1. Throw immediately in `readStopNodeData()` when `readTagExp()` returns `undefined`\n2. Or break the loop on the first failed scan\n3. Or find the next `\u003e` once and reuse/bound that result\n4. Add a test asserting near-linear scaling when payload size doubles\n\n### Proof of concept\n\nNot benchmarked \u2014 static-analysis finding, confidence 0.5.\n\nTo confirm: configure `stopNodes` matching a root element. Build input as `\u0027\u003cstop\u003e\u0027 + \u0027\u003ca \u0027.repeat(n)`. Time `parse()` until it throws `Unexpected end of \u003ctag\u003e`. Start around n=10,000 and double it \u2014 quadratic should show ~4x time per doubling, linear ~2x. Control: same input with a `\u003e` present, or `stopNodes` unset.\n\n### Impact\n\nCPU-exhaustion DoS in Node.js services parsing untrusted XML with `stopNodes` enabled. A ~100KB payload is estimated at ~10\u2079 character operations (roughly a second or more of blocked event loop) \u2014 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).",
"id": "GHSA-474x-hrwr-fgx4",
"modified": "2026-11-10T21:09:44Z",
"published": "2026-11-10T21:09:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-474x-hrwr-fgx4"
},
{
"type": "WEB",
"url": "https://github.com/NaturalIntelligence/fast-xml-parser/commit/0c3659348364959da62954b73728fb3bd05ebcb4"
},
{
"type": "PACKAGE",
"url": "https://github.com/NaturalIntelligence/fast-xml-parser"
},
{
"type": "WEB",
"url": "https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.12.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "fast-xml-parser: Quadratic CPU consumption scanning unterminated stop-node tags"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.