# CVE-2026-33349: fast-xml-parser entity expansion bypass via falsy zero check

Source: https://junglewise.ai/threats/cve-2026-33349-fast-xml-parser-entity-expansion-bypass-via-falsy-zero-check  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-33349 · Severity: low · CVSS 3.1 · Published 2026-03-19

fast-xml-parser is a widely-used Node.js library for parsing XML files. When developers configure the parser to block all entities by setting strict limits to zero, a JavaScript programming error causes those limits to be silently ignored. An attacker supplying malicious XML with thousands of entity definitions can exhaust server memory, crashing applications and disrupting service.

Technologies: [fast-xml-parser (npm)](https://junglewise.ai/threats/technologies/fast-xml-parser). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-33349 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33349 being exploited in the wild.

**How severe is CVE-2026-33349?** Low severity, with a CVSS score of 3.1, published 19 March 2026.

**Which products and versions are affected?** fast-xml-parser (npm) SEMVER:introduced=4.0.0-beta.3,fixed=4.5.5.

**Is there a fix for CVE-2026-33349?** Yes. fast-xml-parser (npm): upgrade to 4.5.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-33349 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-33349?** Check whether you run fast-xml-parser (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fast-xml-parser (npm): upgrade to 4.5.5 or later

  ```sh
  npm install fast-xml-parser@4.5.5
  ```


## Technical details

The vulnerability is a logic error in DocTypeReader.js where entity expansion limits (maxEntityCount and maxEntitySize) are checked using truthy evaluation (&&) instead of explicit type checks. Since 0 is falsy in JavaScript, conditions like "if (this.options.maxEntityCount && entityCount >= maxEntityCount)" evaluate to false when the limit is 0, completely bypassing the check. An attacker can supply XML with a DOCTYPE containing thousands of large entity definitions; the parser will parse them without restriction, leading to memory exhaustion and denial of service. The vulnerability affects versions 4.0.0-beta.3 through 5.5.6; it is fixed in versions 4.5.5 and 5.5.7 by replacing truthy checks with explicit typeof checks. Default configurations are not vulnerable as they use non-zero defaults (maxEntityCount: 100, maxEntitySize: 10000).

## Affected products

- NaturalIntelligence fast-xml-parser 4.0.0-beta.3 through 5.5.6 (patched in 4.5.5, 5.5.7)

## Identifiers

- CVE-2026-33349
- GHSA-jp2q-39xq-3w4g

## Timeline

- 2026-03-19: disclosed
- 2026-03-19: patched: Versions 4.5.5 and 5.5.7 include the fix

## References

- [https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-jp2q-39xq-3w4g](https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-jp2q-39xq-3w4g)

## Related threats

- [fast-xml-parser: Quadratic CPU consumption scanning unterminated stop-node tags](https://junglewise.ai/threats/cve-2026-126066-fast-xml-parser-allows-users-to-process-xml-from-js-object)
- [fast-xml-parser DOCTYPE reset entity expansion limits bypass](https://junglewise.ai/threats/cve-2026-73569-fast-xml-parser-doctype-reset-entity-expansion-limits-bypass)
- [NaturalIntelligence fast-xml-parser XML injection in XMLBuilder](https://junglewise.ai/threats/cve-2026-41650-naturalintelligence-fast-xml-parser-xml-injection-in-xmlbuilder)
- [fast-xml-parser numeric entity expansion bypass](https://junglewise.ai/threats/cve-2026-33036-fast-xml-parser-numeric-entity-expansion-bypass)
- [NaturalIntelligence fast-xml-parser stack overflow in XMLBuilder](https://junglewise.ai/threats/cve-2026-27942-naturalintelligence-fast-xml-parser-stack-overflow-in-xmlbuilder)
