☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N 🐛 CWE-185
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-25896

CVE-2026-25896 Cross-Site Scripting in Fast-xml-parser
📅 PUBLISHED: 2026-02-20 20:57 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 distinct-origin sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.50%
👁️
0.50% probability
12.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Affected: Fast Xml Parser — upgrade to patched release
CVSS VECTOR BREAKDOWN 9.3
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: H Integrity High
A: N Availability None
9.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-25896 is a critical vulnerability in the fast-xml-parser npm package, affecting versions from 4.1.3 up to (but not including) 5.3.5. The flaw resides in the DOCTYPE entity replacement logic, where a dot (.) in an entity name is incorrectly interpreted as a regex wildcard. This allows an attacker to define a malicious entity that shadows built-in XML entities (&lt;, &gt;, &amp;, &quot;, &apos;). When the parsed XML output is rendered in a browser, the attacker-controlled entity values bypass standard encoding, leading to Cross-Site Scripting (XSS). With a CVSS score of 9.3, this vulnerability is considered critical and requires immediate patching.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the fast-xml-parser npm package, a widely used library for XML parsing in Node.js applications. The supply chain risk is significant: any application that uses this library to parse untrusted XML input is vulnerable. Attackers can inject malicious XML payloads through user uploads, API requests, or any other data ingestion point. The package is a direct dependency, meaning the vulnerability propagates to all downstream consumers. Organizations must audit their dependency trees and update to version 5.3.5 or later.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely over a network.
  • Attack Complexity (AC): Low (L) – No special conditions are required; the attacker only needs to supply a malicious XML payload.
  • Privileges Required (PR): None (N) – No authentication or privileges are needed.
  • User Interaction (UI): None (N) – The victim does not need to perform any action beyond viewing the parsed output.
  • Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope (e.g., the browser context).
  • Confidentiality (C): High (H) – An attacker can steal sensitive data (cookies, tokens, etc.).
  • Integrity (I): High (H) – An attacker can modify the rendered page content.
  • Availability (A): High (H) – An attacker can disrupt the application's functionality.

Threat Level: Critical. The combination of network exploitability, low complexity, and high impact makes this a top-priority vulnerability.

Deep Dive & Mechanics

The core issue lies in the entity replacement logic within fast-xml-parser. When parsing a DOCTYPE declaration, the library uses a regex to match entity names. The regex incorrectly treats the dot character (.) as a wildcard (matching any single character) instead of a literal dot. This allows an attacker to define an entity whose name, when matched against built-in entities, shadows them.

For example, consider the built-in entity &lt; which represents the < character. An attacker can define a DOCTYPE entity like <!ENTITY lt "javascript:alert(1)">. Because the regex treats the dot as a wildcard, the entity name lt (without a dot) can be matched by a pattern intended for l.t (where . is a wildcard). This effectively allows the attacker to override the built-in &lt; entity with their own malicious value.

When the parser later encounters &lt; in the XML content, it replaces it with the attacker-defined value instead of the intended < character. If this output is then rendered in a browser (e.g., in a web application), the attacker's JavaScript code executes, resulting in XSS.

Vulnerable vs. Patched Code

Vulnerable Code (version < 5.3.5): The vulnerable code likely uses a regex like /l.t/ to match entity names, where the dot is a wildcard. This allows the attacker to shadow entities.

// Vulnerable regex pattern (conceptual)
const entityRegex = /&(l.t|g.t|amp|quot|apos);/g;

Patched Code (version 5.3.5): The fix escapes the dot in the regex, treating it as a literal character. This prevents the shadowing attack.

// Patched regex pattern (conceptual)
const entityRegex = /&(l\.t|g\.t|amp|quot|apos);/g;

Exploitation & Lab Setup

Red Team (Attack Simulation)

  1. Setup: Create a Node.js application using fast-xml-parser version 4.1.3 or later (but before 5.3.5). The application should parse XML input and render the output in a browser.

  2. Craft Payload: Create an XML file with a malicious DOCTYPE entity that shadows &lt;.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [
  <!ENTITY lt "&lt;img src=x onerror=alert(1)&gt;">
]>
<root>&lt;</root>
  1. Exploit: Send the XML payload to the vulnerable application. The parser will replace &lt; with the attacker-defined value, which includes an <img> tag with an onerror event handler. When the browser renders the output, the JavaScript alert(1) executes.

Blue Team (Defense & Detection)

  1. Detection: Monitor for XML payloads containing DOCTYPE declarations with entity definitions that attempt to shadow built-in entities. Look for patterns like <!ENTITY lt or <!ENTITY gt.

  2. Mitigation: Immediately upgrade fast-xml-parser to version 5.3.5 or later. If immediate patching is not possible, implement a Web Application Firewall (WAF) rule to block XML payloads with suspicious DOCTYPE entity definitions.

  3. Logging: Enable detailed logging of XML parsing errors and entity replacement activities. Correlate with web server logs to identify potential exploitation attempts.

Indicators of Compromise (IOCs)

  • Network: XML payloads containing DOCTYPE declarations with entity names that match built-in entities (e.g., lt, gt, amp, quot, apos).
  • Application Logs: Errors or warnings related to entity replacement in fast-xml-parser.
  • Browser Behavior: Unexpected JavaScript execution (e.g., alert() dialogs) when viewing parsed XML output.
  • File System: Presence of XML files with malicious DOCTYPE definitions in upload directories.

Detection Engineering

YARA Rule

rule CVE_2026_25896_XML_Entity_Shadowing {
    meta:
        description = "Detects XML payloads attempting to exploit CVE-2026-25896 by shadowing built-in entities"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2026-25896"
    strings:
        $entity_lt = "<!ENTITY lt " ascii nocase
        $entity_gt = "<!ENTITY gt " ascii nocase
        $entity_amp = "<!ENTITY amp " ascii nocase
        $entity_quot = "<!ENTITY quot " ascii nocase
        $entity_apos = "<!ENTITY apos " ascii nocase
    condition:
        any of ($entity_*) and #xml_doctype > 0
}

Sigma Rule

title: CVE-2026-25896 - XML Entity Shadowing Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP requests containing XML payloads with DOCTYPE entity definitions that shadow built-in entities.
author: Valters IT
date: 2025/04/10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2026-25896
logsource:
    category: webserver
    product: apache
    service: http
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'xml'
        cs-body|contains:
            - '<!ENTITY lt '
            - '<!ENTITY gt '
            - '<!ENTITY amp '
            - '<!ENTITY quot '
            - '<!ENTITY apos '
    condition: selection
falsepositives:
    - Legitimate use of custom entities (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2026-25896 - XML Entity Shadowing Attempt"; flow:to_server,established; content:"POST"; http_method; content:"xml"; http_uri; content:"<!ENTITY lt "; http_client_body; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Patch: Upgrade fast-xml-parser to version 5.3.5 or later. Run npm update fast-xml-parser or update the version in your package.json file.

  2. Input Validation: Implement strict input validation for XML content. Reject any XML that contains DOCTYPE declarations with entity definitions that match built-in entity names.

  3. WAF Rules: Deploy Web Application Firewall rules to block XML payloads with suspicious DOCTYPE entity definitions.

  4. Content Security Policy (CSP): Implement a strict CSP header to mitigate the impact of XSS even if the vulnerability is exploited.

  5. Regular Audits: Regularly audit your dependency tree for known vulnerabilities using tools like npm audit or Snyk.


Valters IT
Securing Digital Frontiers

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-25896/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.