Critical severityNVD Advisory· Published Feb 20, 2026· Updated Mar 2, 2026
fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names
CVE-2026-25896
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. From 4.1.3to before 5.3.5, a dot (.) in a DOCTYPE entity name is treated as a regex wildcard during entity replacement, allowing an attacker to shadow built-in XML entities (<, >, &, ", ') with arbitrary values. This bypasses entity encoding and leads to XSS when parsed output is rendered. This vulnerability is fixed in 5.3.5.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
fast-xml-parsernpm | >= 5.0.0, < 5.3.5 | 5.3.5 |
fast-xml-parsernpm | >= 4.1.3, < 4.5.4 | 4.5.4 |
Affected products
15- osv-coords14 versionspkg:apk/chainguard/dbgatepkg:apk/chainguard/dbgate-fipspkg:apk/chainguard/kibana-9.3pkg:apk/chainguard/kibana-9.3-iamguardedpkg:apk/chainguard/langfuse-2-workerpkg:apk/chainguard/langfuse-fips-2-workerpkg:apk/chainguard/prismpkg:apk/chainguard/renovatepkg:apk/chainguard/tileserver-glpkg:apk/chainguard/tileserver-gl-fipspkg:apk/wolfi/prismpkg:apk/wolfi/renovatepkg:apk/wolfi/tileserver-glpkg:npm/fast-xml-parser
< 7.0.6-r1+ 13 more
- (no CPE)range: < 7.0.6-r1
- (no CPE)range: < 7.1.0-r0
- (no CPE)range: < 9.3.0-r1
- (no CPE)range: < 9.3.0-r1
- (no CPE)range: < 2.95.12-r11
- (no CPE)range: < 2.95.12-r13
- (no CPE)range: < 5.14.3-r7
- (no CPE)range: < 43.48.3-r0
- (no CPE)range: < 5.5.0-r5
- (no CPE)range: < 5.5.0-r6
- (no CPE)range: < 5.14.3-r7
- (no CPE)range: < 43.48.3-r0
- (no CPE)range: < 5.5.0-r5
- (no CPE)range: >= 5.0.0, < 5.3.5
- Range: >= 5.0.0, < 5.3.5
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-m7jm-9gc2-mpf2ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25896ghsaADVISORY
- github.com/NaturalIntelligence/fast-xml-parser/commit/943ef0eb1b2d3284e72dd74f44a042ee9f07026eghsax_refsource_MISCWEB
- github.com/NaturalIntelligence/fast-xml-parser/commit/ddcd0acf26ddd682cb0dc15a2bd6aa3b96bb1e69ghsax_refsource_MISCWEB
- github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.3.5ghsax_refsource_MISCWEB
- github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-m7jm-9gc2-mpf2ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.