CVE-2026-26278
JSON

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 packageVersionsReported by
NaturalIntelligence fast-xml-parser>= 5.0.0, < 5.3.6, >= 4.1.3, < 4.5.4, from 4.1.3 before 5.3.6CVE List, NVD
advanced-cluster-security/rhacs-main-rhel8Not specified
Not affected: from 1775594119 before *, from 1775594284 before *
CVE List
rhdh/rhdh-hub-rhel9Not specified
Not affected: from 1774545605 before *, from 1775140647 before *
CVE List
odf4/cephcsi-rhel9Not specified
Not affected: from 1783676191 before *, from 1783684360 before *, from 1783667125 before *
CVE List
odf4/cephcsi-rhel9-operatorNot specified
Not affected: from 1783929816 before *, from 1783684068 before *, from 1783666755 before *
CVE List
odf4/mcg-core-rhel9Not specified
Not affected: from 1784094353 before *, from 1784054582 before *, from 1784054598 before *
CVE List
odf4/mcg-rhel9-operatorNot specified
Not affected: from 1784093953 before *, from 1784054606 before *, from 1784055387 before *
CVE List
odf4/ocs-client-console-rhel9Not specified
Not affected: from 1784094943 before *, from 1784055295 before *, from 1784055726 before *
CVE List
odf4/ocs-client-rhel9-operatorNot specified
Not affected: from 1783676585 before *, from 1783684603 before *, from 1783667517 before *
CVE List
odf4/ocs-metrics-exporter-rhel9Not specified
Not affected: from 1783676649 before *, from 1783684668 before *, from 1783667577 before *
CVE List
odf4/ocs-rhel9-operatorNot specified
Not affected: from 1783676675 before *, from 1783684667 before *, from 1783667611 before *
CVE List
odf4/odf-cli-rhel9Not specified
Not affected: from 1784094299 before *, from 1784054873 before *, from 1784055020 before *
CVE List

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
redhat-SADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-776

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

https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-jmr7-xgp7-cmfjexploit, vendor-advisory, web
https://github.com/NaturalIntelligence/fast-xml-parser/commit/910dae5be2de2955e968558fadf6e8f74f117a77patch, web
https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.3.6product, release-notes, web
https://access.redhat.com/security/cve/CVE-2026-26278vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2441120issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26278.json
https://access.redhat.com/errata/RHSA-2026:7110vendor-advisory
https://access.redhat.com/errata/RHSA-2026:7128vendor-advisory
https://access.redhat.com/errata/RHSA-2026:6174vendor-advisory
https://access.redhat.com/errata/RHSA-2026:6802vendor-advisory
https://access.redhat.com/errata/RHSA-2026:41941vendor-advisory
https://access.redhat.com/errata/RHSA-2026:41944vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-26278 changed 2026-09-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-jmr7-xgp7-cmfj changed 2026-09-10CC-BY-4.0
NVDCVE-2026-26278 changed 2026-09-10Public domain