CVE-2026-26278: Fast xml parser Denial of Service Vulnerability
HIGHCVE-2026-26278 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Fast xml parser libraries in the npm ecosystem. The issue involves fast-xml-parser affected by dos through entity expansion in doctype (no expansion limit). Remediation is available by upgrading affected packages to version 4.5.4, 5.3.6.
CVE-2026-26278 at a Glance
Security Impact
CVSS: 7.5
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:H).
How to Fix CVE-2026-26278
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.
npm install fast-xml-parser@4.5.4
npm install fast-xml-parser@5.3.6
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-26278, 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 4.5.4), 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-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. 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
CVE-2026-26278 Affected Fast xml parser Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fast-xml-parser
|
npm |
≥ 4.1.3
< 4.5.4
|
4.5.4
|
|
fast-xml-parser
|
npm |
≥ 5.0.0
< 5.3.6
|
5.3.6
|
References
Frequently Asked Questions
What is CVE-2026-26278?
Which Fast xml parser versions are affected?
What version fixes CVE-2026-26278?
Is fast-xml-parser affected?
What is the CVSS score of CVE-2026-26278?
What CWE is associated with CVE-2026-26278?
How can I check npm dependencies for CVE-2026-26278?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jmr7-xgp7-cmfj",
"modified" : "2026-02-27T16:50:38Z",
"published" : "2026-02-17T21:30:10Z",
"aliases" : [ "CVE-2026-26278" ],
"summary" : "fast-xml-parser affected by DoS through entity expansion in DOCTYPE (no expansion limit)",
"details" : "### Summary\nThe XML parser can be forced to do an unlimited amount of entity expansion. With a very small XML input, it’s possible to make the parser spend seconds or even minutes processing a single request, effectively freezing the application.\n\n### Details\nThere is a check in `DocTypeReader.js` that tries to prevent entity expansion attacks by rejecting entities that reference other entities (it looks for & inside entity values). This does stop classic “Billion Laughs” payloads.\n\nHowever, it doesn’t stop a much simpler variant.\n\nIf you define one large entity that contains only raw text (no & characters) and then reference it many times, the parser will happily expand it every time. There is no limit on how large the expanded result can become, or how many replacements are allowed.\n\nThe problem is in `replaceEntitiesValue()` inside `OrderedObjParser.js`. It repeatedly runs `val.replace()` in a loop, without any checks on total output size or execution cost. As the entity grows or the number of references increases, parsing time explodes.\n\nRelevant code:\n\n`DocTypeReader.js` (lines 28–33): entity registration only checks for &\n\n`OrderedObjParser.js` (lines 439–458): entity replacement loop with no limits\n\n### PoC\n\n```js\nconst { XMLParser } = require('fast-xml-parser');\n\nconst entity = 'A'.repeat(1000);\nconst refs = '&big;'.repeat(100);\nconst xml = `<!DOCTYPE foo [<!ENTITY big \"${entity}\">]><root>${refs}</root>`;\n\nconsole.time('parse');\nnew XMLParser().parse(xml); // ~4–8 seconds for ~1.3 KB of XML\nconsole.timeEnd('parse');\n\n// 5,000 chars × 100 refs takes 200+ seconds\n// 50,000 chars × 1,000 refs will hang indefinitely\n```\n\n### Impact\nThis is a straightforward denial-of-service issue.\n\nAny service that parses user-supplied XML using the default configuration is vulnerable. Since Node.js runs on a single thread, the moment the parser starts expanding entities, the event loop is blocked. While this is happening, the server can’t handle any other requests.\n\nIn testing, a payload of only a few kilobytes was enough to make a simple HTTP server completely unresponsive for several minutes, with all other requests timing out.\n\n### Workaround\n\nAvoid using DOCTYPE parsing by `processEntities: false` option.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "fast-xml-parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.3"
}, {
"fixed" : "4.5.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "fast-xml-parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.3.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-jmr7-xgp7-cmfj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-26278"
}, {
"type" : "WEB",
"url" : "https://github.com/NaturalIntelligence/fast-xml-parser/commit/910dae5be2de2955e968558fadf6e8f74f117a77"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/NaturalIntelligence/fast-xml-parser"
}, {
"type" : "WEB",
"url" : "https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.3.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-776" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-17T21:30:10Z",
"nvd_published_at" : "2026-02-19T20:25:43Z"
}
}