CVE-2026-25896 fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names

Critical 9.3 Published Updated

An attacker can bypass XML entity encoding via regex injection in DOCTYPE names, leading to Cross-Site Scripting (XSS) when parsed output is rendered.

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-25896?

CVE-2026-25896 is a critical cross-site scripting vulnerability in NaturalIntelligence fast-xml-parser, published on 20 Feb 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 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.

Weakness: CWE-79, CWE-185

Which versions are affected by CVE-2026-25896?

4 open source packages ship an affected version, including fast-xml-parser. It affects 1 product.

PackageAffectedFixed in
fast-xml-parser npmFrom 4.1.34.5.4
fast-xml-parser npmFrom 4.1.34.5.4
fast-xml-parser npmFrom 5.0.05.3.5
fast-xml-parser npmFrom 5.0.05.3.5

Products include Naturalintelligence Fast-Xml-Parser.

How do I fix CVE-2026-25896?

Upgrade fast-xml-parser to a fixed version for your release line: 4.5.4 or 5.3.5.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-25896 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25896 exists.

Sources

Also known as CLEANSTART-2026-GZ45856, CLEANSTART-2026-HR43614, CLSA-2026-1789376231, DEBIAN-CVE-2026-25896, ECHO-88fe-9a88-58df, GHSA-m7jm-9gc2-mpf2 and 16 more.

Is CVE-2026-25896 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free