CVE-2026-33349 fast-xml-parser: Entity Expansion Limits Bypassed When Set to Zero Due to JavaScript Falsy Evaluation
Attackers can cause denial of service via XML entity expansion in fast-xml-parser when entity limits are explicitly set to zero.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-33349?
CVE-2026-33349 is a medium-severity denial of service vulnerability in NaturalIntelligence fast-xml-parser, published on 24 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
fast-xml-parser allows users to process XML from JS object without C/C++ based libraries or callbacks. From version 4.0.0-beta.3 to before version 5.5.7, the DocTypeReader in fast-xml-parser uses JavaScript truthy checks to evaluate maxEntityCount and maxEntitySize configuration limits. When a developer explicitly sets either limit to 0 — intending to disallow all entities or restrict entity size to zero bytes — the falsy nature of 0 in JavaScript causes the guard conditions to short-circuit, completely bypassing the limits. An attacker who can supply XML input to such an application can trigger unbounded entity expansion, leading to memory exhaustion and denial of service. This issue has been patched in version 5.5.7.
Weakness: CWE-1284
Which versions are affected by CVE-2026-33349?
4 open source packages ship an affected version, including fast-xml-parser. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
fast-xml-parser npm | From 4.0.0-beta.3 | 4.5.5 |
fast-xml-parser npm | From 4.0.0-beta.3 | 4.5.5 |
fast-xml-parser npm | From 5.0.0 | 5.5.7 |
fast-xml-parser npm | From 5.0.0 | 5.5.7 |
Products include Naturalintelligence Fast-Xml-Parser.
How do I fix CVE-2026-33349?
Upgrade fast-xml-parser to a fixed version for your release line: 4.5.5 or 5.5.7.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-33349 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33349 exists.
Other vulnerabilities in NaturalIntelligence fast-xml-parser
- CVE-2026-25896 fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names
- CVE-2026-33036 fast-xml-parser affected by numeric entity expansion bypassing all entity expansion limits (incomplete fix for CVE-2026-26278)
- CVE-2026-26278 fast-xml-parser affected by DoS through entity expansion in DOCTYPE (no expansion limit)
- CVE-2026-25128 fast-xml-parser has RangeError DoS Numeric Entities Bug
- CVE-2024-41818 ReDOS at currency parsing fast-xml-parser
Sources
Also known as CLEANSTART-2026-NV50179, CLEANSTART-2026-RF51204, CLSA-2026-1786373314, DEBIAN-CVE-2026-33349, ECHO-ffeb-f8e6-0f69, GHSA-jp2q-39xq-3w4g and 17 more.