The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-25896

CVE-2026-25896: fast-xml-parser XSS Vulnerability

CVE-2026-25896 is an XSS vulnerability in fast-xml-parser where DOCTYPE entity names with dots bypass entity encoding, allowing attackers to shadow built-in XML entities. This article covers technical details, versions 4.1.3-5.3.4, impact, and mitigation.

Published: February 27, 2026

CVE-2026-25896 Overview

CVE-2026-25896 is a critical Cross-Site Scripting (XSS) vulnerability in fast-xml-parser, a popular JavaScript library that allows users to validate XML, parse XML to JavaScript objects, or build XML from JavaScript objects without C/C++ based libraries. The vulnerability stems from improper handling of special characters in DOCTYPE entity names, where a dot (.) is incorrectly treated as a regex wildcard during entity replacement. This flaw enables attackers to shadow built-in XML entities (<, >, &, ", ') with arbitrary values, bypassing entity encoding and leading to XSS when parsed output is rendered in a browser context.

Critical Impact

Attackers can inject arbitrary malicious content by exploiting regex character interpretation in entity names, enabling XSS attacks that could lead to session hijacking, credential theft, or malicious script execution in victim browsers.

Affected Products

  • fast-xml-parser versions 4.1.3 to 5.3.4
  • Applications using vulnerable fast-xml-parser versions for XML parsing
  • Web applications rendering XML-parsed content in browser contexts

Discovery Timeline

  • February 20, 2026 - CVE-2026-25896 published to NVD
  • February 23, 2026 - Last updated in NVD database

Technical Details for CVE-2026-25896

Vulnerability Analysis

The vulnerability exists in the entity replacement mechanism within fast-xml-parser. When processing external entities defined in DOCTYPE declarations, the library constructs regular expressions using entity names directly without proper escaping. This means special regex characters like . (dot), - (hyphen), + (plus), * (asterisk), and : (colon) are interpreted as regex metacharacters rather than literal characters.

The most significant impact comes from the dot character (.), which in regex syntax matches any single character. An attacker can define a malicious entity with a name like l. which would match built-in entities such as < and >. By replacing these fundamental XML encoding entities with arbitrary values (such as <script> tags), the attacker effectively bypasses the XML entity encoding that normally prevents XSS.

This vulnerability is classified under CWE-185 (Incorrect Regular Expression), highlighting the core issue of improper regex pattern construction from untrusted input.

Root Cause

The root cause lies in the direct use of entity names when constructing RegExp objects without escaping regex metacharacters. In the vulnerable code, entity names from XML DOCTYPE declarations are concatenated directly into regex patterns like new RegExp("&"+entityName+";","g"). When an entity name contains regex special characters, these characters retain their special meaning, causing the regex to match unintended strings.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can craft malicious XML input containing a DOCTYPE declaration with specially named entities. When this XML is parsed by a vulnerable fast-xml-parser instance and the output is rendered in a web context, the injected content executes.

The attack flow involves:

  1. Crafting XML with a DOCTYPE containing an entity name with regex metacharacters (e.g., l.)
  2. Defining this entity's value as malicious content (e.g., <script>alert('XSS')</script>)
  3. Submitting the crafted XML to an application using vulnerable fast-xml-parser
  4. The malicious entity shadows built-in entities, injecting arbitrary content
  5. When the parsed output is rendered, the XSS payload executes
javascript
// Security patch in src/xmlparser/OrderedObjParser.js - fix: Escape regex char in entity name
// Source: https://github.com/NaturalIntelligence/fast-xml-parser/commit/943ef0eb1b2d3284e72dd74f44a042ee9f07026e
   const entKeys = Object.keys(externalEntities);
   for (let i = 0; i < entKeys.length; i++) {
     const ent = entKeys[i];
+    const escaped = ent.replace(/[.\-+*:]/g, '\\.');
     this.lastEntities[ent] = {
-       regex: new RegExp("&"+ent+";","g"),
+       regex: new RegExp("&"+escaped+";","g"),
        val : externalEntities[ent]
     }
   }

The fix properly escapes regex metacharacters in entity names before constructing the regular expression pattern.

Detection Methods for CVE-2026-25896

Indicators of Compromise

  • XML input containing DOCTYPE declarations with entity names containing special characters (., -, +, *, :)
  • Entity names that partially match built-in XML entities (e.g., l., am., quo.)
  • Unexpected script tags or HTML content appearing in XML-parsed output
  • Browser console errors or unexpected JavaScript execution after XML parsing

Detection Strategies

  • Implement input validation to detect DOCTYPE declarations with suspicious entity names
  • Monitor application logs for XML parsing errors or unexpected entity replacement behavior
  • Deploy Web Application Firewall (WAF) rules to detect malicious DOCTYPE entity patterns
  • Use Content Security Policy (CSP) headers to mitigate XSS impact if exploitation occurs

Monitoring Recommendations

  • Enable verbose logging for XML parsing operations to capture entity definitions
  • Monitor for anomalous patterns in XML input containing regex metacharacters in entity names
  • Implement real-time alerting for potential XSS attempts in XML-processing endpoints
  • Review application dependencies regularly using Software Composition Analysis (SCA) tools

How to Mitigate CVE-2026-25896

Immediate Actions Required

  • Update fast-xml-parser to version 5.3.5 or later immediately
  • Audit all applications using fast-xml-parser to identify affected deployments
  • Implement input sanitization as a defense-in-depth measure while patching
  • Review application logs for evidence of exploitation attempts

Patch Information

The vulnerability is fixed in fast-xml-parser version 5.3.5. The fix escapes regex metacharacters (., -, +, *, :) in entity names before constructing regular expressions, ensuring these characters are treated literally rather than as regex patterns.

Relevant patches:

  • OrderedObjParser.js fix
  • EntitiesParser.js and DocTypeReader.js fix
  • Release v5.3.5

For detailed security information, see the GitHub Security Advisory GHSA-m7jm-9gc2-mpf2.

Workarounds

  • Disable DOCTYPE processing if not required by setting parser options to reject DOCTYPE declarations
  • Implement strict input validation to reject XML containing entity names with regex metacharacters
  • Apply Content Security Policy (CSP) headers to limit XSS impact as a defense-in-depth measure
  • Consider using an alternative XML parser until upgrade is possible
bash
# Update fast-xml-parser to patched version
npm update fast-xml-parser@5.3.5

# Or install specific version
npm install fast-xml-parser@5.3.5

# Verify installed version
npm list fast-xml-parser

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechFast Xml Parser

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-185
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Release v5.3.5

  • GitHub Security Advisory GHSA-m7jm-9gc2-mpf2
  • Related CVEs
  • CVE-2026-27942: fast-xml-parser Buffer Overflow Flaw

  • CVE-2026-26278: fast-xml-parser DoS Vulnerability

  • CVE-2026-25128: fast-xml-parser DoS Vulnerability

  • CVE-2024-41818: Fast-xml-parser DoS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English