CVE-2026-25896: fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names
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.
Security readout for executives and security teams
Plain-English summary
CVE-2026-25896 affects fast-xml-parser, a JavaScript XML parser. Malicious XML can abuse entity handling so characters that should remain safely encoded may become attacker-controlled text. If an application renders parsed output into a web page, this can become cross-site scripting.
Executive priority
Treat this as urgent for internet-facing or partner-facing services that parse XML and display results. Prioritize dependency updates and exposure review because the CVSS score is 9.3 and the vulnerable behavior can directly create XSS.
Technical view
In affected fast-xml-parser versions, a dot in a DOCTYPE entity name is treated as a regex wildcard during entity replacement. This can shadow built-in XML entities such as lt, gt, amp, quot, and apos, bypassing expected encoding. Affected ranges are >=4.1.3,<4.5.4 and >=5.0.0,<5.3.5.
Likely exposure
Exposure is most likely in Node.js or JavaScript applications that parse XML from users, partners, feeds, uploads, or integrations and then render parsed values into HTML or browser-visible content.
Exploitation context
The source bundle reports no KEV listing and provides no evidence of active exploitation. The risk remains high because exploitation is network-reachable, needs no privileges, and can lead to XSS when unsafe parsed output is rendered.
Researcher notes
The root issue is regex injection through entity names during replacement. Validate only in controlled tests, focusing on whether built-in entity behavior can be shadowed and whether downstream rendering creates executable HTML. Do not assume exposure without a rendering path.
Mitigation direction
Upgrade fast-xml-parser to version 5.3.5 or later where feasible.
For v4 deployments, verify vendor guidance for a non-affected 4.x version.
Inventory direct and transitive fast-xml-parser dependencies in all JavaScript projects.
Sanitize or encode parsed XML output before rendering it in HTML.
Restrict or reject untrusted XML containing DOCTYPE where business logic permits.
Validation and detection
Check package manifests and lockfiles for affected fast-xml-parser versions.
Confirm deployed artifacts do not contain versions >=4.1.3,<4.5.4 or >=5.0.0,<5.3.5.
Identify routes, workers, jobs, or services that parse external XML.
Review rendering paths that place parsed XML values into web pages.
Run regression tests covering XML entity handling and output encoding.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-185: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-185 · source CWE mapping
Incorrect Regular Expression
Incorrect Regular Expression represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.