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

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

- **Severity:** Critical 9.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Feb 2026
- **Updated:** 10 Sep 2026
- **Also known as:** CLEANSTART-2026-GZ45856, CLEANSTART-2026-HR43614, CLSA-2026-1789376231, DEBIAN-CVE-2026-25896, ECHO-88fe-9a88-58df, GHSA-m7jm-9gc2-mpf2, MINI-2385-pf9r-h7m8, MINI-25rr-956p-gcqq, MINI-28fg-6xx3-336q, MINI-689f-45j3-772r, MINI-7qm3-vp2c-5r8j, MINI-fhg7-hgff-gf9w, MINI-gmm8-x9fm-fqxh, MINI-j7qc-4c6f-qvvc, MINI-mw86-vpcv-ph88, MINI-p58x-6m5q-33m4, MINI-phq2-7mcj-9wxq, MINI-r43f-3rpj-x5cr, MINI-vxq9-53mx-mww3, MINI-xm8c-q9hr-6m52, ROOT-APP-NPM-CVE-2026-25896, UBUNTU-CVE-2026-25896

## 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 (&lt;, &gt;, &amp;, &quot;, &apos;) 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 (Improper Neutralization of Input During Web Page Generation), CWE-185 (Incorrect Regular Expression)

## Which versions are affected by CVE-2026-25896?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `fast-xml-parser` | npm | From 4.1.3 | 4.5.4 |
| `fast-xml-parser` | npm | From 4.1.3 | 4.5.4 |
| `fast-xml-parser` | npm | From 5.0.0 | 5.3.5 |
| `fast-xml-parser` | npm | From 5.0.0 | 5.3.5 |

Products: 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.

## Is CVE-2026-25896 being exploited?

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

## Other vulnerabilities in NaturalIntelligence fast-xml-parser

- [CVE-2026-33036](https://insights.sbomify.com/CVE-2026-33036/): fast-xml-parser affected by numeric entity expansion bypassing all entity expansion limits (incomplete fix for CVE-2026-26278) (high 7.5)
- [CVE-2026-26278](https://insights.sbomify.com/CVE-2026-26278/): fast-xml-parser affected by DoS through entity expansion in DOCTYPE (no expansion limit) (high 7.5)
- [CVE-2026-25128](https://insights.sbomify.com/CVE-2026-25128/): fast-xml-parser has RangeError DoS Numeric Entities Bug (high 7.5)
- [CVE-2024-41818](https://insights.sbomify.com/CVE-2024-41818/): ReDOS at currency parsing fast-xml-parser (high 7.5)
- [CVE-2023-34104](https://insights.sbomify.com/CVE-2023-34104/): Regex Injection via Doctype Entities (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25896 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25896 exists.

Affected packages and fixed versions:
- fast-xml-parser (npm): affected from 4.1.3; fixed in 4.5.4
- fast-xml-parser (npm): affected from 4.1.3; fixed in 4.5.4
- fast-xml-parser (npm): affected from 5.0.0; fixed in 5.3.5
- fast-xml-parser (npm): affected from 5.0.0; fixed in 5.3.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25896/ (Markdown: https://insights.sbomify.com/CVE-2026-25896/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25896
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25896
- OSV: https://osv.dev/vulnerability/CVE-2026-25896

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25896/
Summaries are generated and may contain mistakes; the official description above is the record.
