7.5high
fast-xml-parser affected by DoS through entity expansion in DOCTYPE (no expansion limit)
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.92% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jmr7-xgp7-cmfj
Description
fast-xml-parser allows users to validate XML, parse XML to JS object, or build XML from JS object without C/C++ based libraries and no callback. In versions 4.1.3 through 5.3.5, the 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. Version 5.3.6 fixes the issue. As a workaround, avoid using DOCTYPE parsing by `processEntities: false` option.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| NaturalIntelligence fast-xml-parser | >= 5.0.0, < 5.3.6, >= 4.1.3, < 4.5.4, from 4.1.3 before 5.3.6 | CVE List, NVD |
| advanced-cluster-security/rhacs-main-rhel8 | Not specified Not affected: from 1775594119 before *, from 1775594284 before * | CVE List |
| rhdh/rhdh-hub-rhel9 | Not specified Not affected: from 1774545605 before *, from 1775140647 before * | CVE List |
| odf4/cephcsi-rhel9 | Not specified Not affected: from 1783676191 before *, from 1783684360 before *, from 1783667125 before * | CVE List |
| odf4/cephcsi-rhel9-operator | Not specified Not affected: from 1783929816 before *, from 1783684068 before *, from 1783666755 before * | CVE List |
| odf4/mcg-core-rhel9 | Not specified Not affected: from 1784094353 before *, from 1784054582 before *, from 1784054598 before * | CVE List |
| odf4/mcg-rhel9-operator | Not specified Not affected: from 1784093953 before *, from 1784054606 before *, from 1784055387 before * | CVE List |
| odf4/ocs-client-console-rhel9 | Not specified Not affected: from 1784094943 before *, from 1784055295 before *, from 1784055726 before * | CVE List |
| odf4/ocs-client-rhel9-operator | Not specified Not affected: from 1783676585 before *, from 1783684603 before *, from 1783667517 before * | CVE List |
| odf4/ocs-metrics-exporter-rhel9 | Not specified Not affected: from 1783676649 before *, from 1783684668 before *, from 1783667577 before * | CVE List |
| odf4/ocs-rhel9-operator | Not specified Not affected: from 1783676675 before *, from 1783684667 before *, from 1783667611 before * | CVE List |
| odf4/odf-cli-rhel9 | Not specified Not affected: from 1784094299 before *, from 1784054873 before *, from 1784055020 before * | CVE List |
| odf4/odf-console-rhel9 | Not specified Not affected: from 1784094725 before *, from 1784055589 before *, from 1784055586 before * | CVE List |
| odf4/odf-cosi-sidecar-rhel9 | Not specified Not affected: from 1783676820 before *, from 1783684779 before *, from 1783667790 before * | CVE List |
| odf4/odf-csi-addons-rhel9-operator | Not specified Not affected: from 1783676883 before *, from 1783684831 before *, from 1783667859 before * | CVE List |
| odf4/odf-csi-addons-sidecar-rhel9 | Not specified Not affected: from 1783676894 before *, from 1783684839 before *, from 1783667875 before * | CVE List |
| odf4/odf-multicluster-console-rhel9 | Not specified Not affected: from 1784095175 before *, from 1784055533 before *, from 1784055576 before * | CVE List |
| odf4/odf-multicluster-rhel9-operator | Not specified Not affected: from 1783676977 before *, from 1784055558 before *, from 1784055244 before * | CVE List |
| odf4/odf-must-gather-rhel9 | Not specified Not affected: from 1784093503 before *, from 1784056134 before *, from 1784055382 before * | CVE List |
| odf4/odf-rhel9-operator | Not specified Not affected: from 1783677297 before *, from 1783685128 before *, from 1783668266 before * | CVE List |
| odf4/odr-rhel9-operator | Not specified Not affected: from 1783677345 before *, from 1783685129 before *, from 1783668288 before * | CVE List |
| odf4/rook-ceph-rhel9-operator | Not specified Not affected: from 1783677533 before *, from 1783685375 before *, from 1783669219 before * | CVE List |
| odf4/odf-cloudnative-pg-rhel9-operator | Not specified Not affected: from 1783684707 before *, from 1783667641 before * | CVE List |
| odf4/odf-external-snapshotter-rhel9-operator | Not specified Not affected: from 1783667869 before * | CVE List |
| odf4/odf-external-snapshotter-sidecar-rhel9 | Not specified Not affected: from 1783667877 before * | CVE List |
| satellite/iop-host-inventory-frontend-rhel9 | Not specified Not affected: from 1785922764 before * | CVE List |
| mta/mta-ui-rhel9 | Not specified | CVE List |
| openshift-gitops-1/argocd-rhel8 | Not specified | CVE List |
| openshift-gitops-1/argocd-rhel9 | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin-rhel9 | Not specified | CVE List |
| satellite/iop-vulnerability-frontend-rhel9 | Not specified | CVE List |
| ansible-automation-platform/automation-portal | Not specified | CVE List |
| fast-xml-parser (npm) | from 4.1.3 before 4.5.4, from 5.0.0 before 5.3.6 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
fast-xml-parser allows users to validate XML, parse XML to JS object, or build XML from JS object without C/C++ based libraries and no callback. In versions 4.1.3 through 5.3.5, the 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. Version 5.3.6 fixes the issue. As a workaround, avoid using DOCTYPE parsing by `processEntities: false` option.
GitHub Advisory Database
Summary
The 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.
Details
There 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.
However, it doesn’t stop a much simpler variant.
If 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.
The 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.
Relevant code:
DocTypeReader.js (lines 28–33): entity registration only checks for &
OrderedObjParser.js (lines 439–458): entity replacement loop with no limits
PoC
const { XMLParser } = require('fast-xml-parser');
const entity = 'A'.repeat(1000);
const refs = '&big;'.repeat(100);
const xml = `<!DOCTYPE foo [<!ENTITY big "${entity}">]><root>${refs}</root>`;
console.time('parse');
new XMLParser().parse(xml); // ~4–8 seconds for ~1.3 KB of XML
console.timeEnd('parse');
// 5,000 chars × 100 refs takes 200+ seconds
// 50,000 chars × 1,000 refs will hang indefinitely
Impact
This is a straightforward denial-of-service issue.
Any 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.
In 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.
Workaround
Avoid using DOCTYPE parsing by processEntities: false option.
NVD (es)
fast-xml-parser permite a los usuarios validar XML, analizar XML a objeto JS, o construir XML desde objeto JS sin bibliotecas basadas en C/C++ y sin callback. En las versiones 4.1.3 a 5.3.5, el analizador XML puede ser forzado a realizar una cantidad ilimitada de expansión de entidades. Con una entrada XML muy pequeña, es posible hacer que el analizador dedique segundos o incluso minutos a procesar una única solicitud, congelando efectivamente la aplicación. La versión 5.3.6 corrige el problema. Como solución alternativa, evite usar el análisis de DOCTYPE mediante la opción 'processEntities: false'.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26278 changed 2026-09-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jmr7-xgp7-cmfj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-26278 changed 2026-09-10 | Public domain |