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-27942

CVE-2026-27942: fast-xml-parser Buffer Overflow Flaw

CVE-2026-27942 is a buffer overflow vulnerability in fast-xml-parser that causes stack overflow crashes when using XML builder with preserveOrder:true. This article covers technical details, affected versions, and mitigation.

Published: February 27, 2026

CVE-2026-27942 Overview

CVE-2026-27942 is a Denial of Service vulnerability affecting fast-xml-parser, a popular JavaScript library that enables users to validate XML, parse XML to JS objects, or build XML from JS objects without C/C++ based libraries. Prior to version 5.3.8, the application crashes with a stack overflow when users invoke the XML builder with the preserveOrder:true configuration option.

Critical Impact

Applications using fast-xml-parser with preserveOrder:true are vulnerable to denial of service attacks through crafted input that triggers stack overflow conditions, potentially crashing Node.js applications.

Affected Products

  • fast-xml-parser versions prior to 5.3.8
  • Applications using XML builder functionality with preserveOrder:true option

Discovery Timeline

  • 2026-02-26 - CVE-2026-27942 published to NVD
  • 2026-02-26 - Last updated in NVD database

Technical Details for CVE-2026-27942

Vulnerability Analysis

This vulnerability is classified under CWE-120 (Buffer Copy without Checking Size of Input), though in the JavaScript context it manifests as a stack overflow condition. The root cause lies in how the orderedJs2Xml.js module handles input when the preserveOrder:true option is enabled. The vulnerable code path fails to validate whether the input parameter is an array before iterating over it, leading to recursive processing that can exhaust the call stack.

The attack vector is network-based, meaning attackers can potentially exploit this vulnerability remotely by providing malicious input to web applications that process user-supplied data through the fast-xml-parser library. When exploited, the application crashes completely, resulting in service disruption.

Root Cause

The vulnerability stems from improper input validation in the XML builder's ordered processing mode. When preserveOrder:true is configured, the builder expects array input but does not validate this assumption. Non-array values passed to the builder function trigger recursive behavior that leads to stack exhaustion.

Attack Vector

An attacker can exploit this vulnerability by providing specially crafted non-array input to applications using fast-xml-parser's XML builder with preserveOrder:true. The attack requires no authentication or user interaction and can be delivered over the network through any application interface that accepts data destined for XML building operations.

javascript
     let xmlStr = "";
     let isPreviousElementTag = false;
 

+    if (!Array.isArray(arr)) {
+        // Non-array values (e.g. string tag values) should be treated as text content
+        if (arr !== undefined && arr !== null) {
+            let text = arr.toString();
+            text = replaceEntitiesValue(text, options);
+            return text;
+        }
+        return "";
+    }
+
     for (let i = 0; i < arr.length; i++) {
         const tagObj = arr[i];
         const tagName = propName(tagObj);
-        if(tagName === undefined) continue;
+        if (tagName === undefined) continue;
 
         let newJPath = "";
         if (jPath.length === 0) newJPath = tagName

Source: GitHub Commit Update

Detection Methods for CVE-2026-27942

Indicators of Compromise

  • Unexpected application crashes with stack overflow error messages in Node.js processes
  • Elevated crash rates in services using fast-xml-parser for XML building operations
  • Error logs containing "RangeError: Maximum call stack size exceeded" exceptions

Detection Strategies

  • Monitor application error logs for stack overflow exceptions originating from fast-xml-parser or orderedJs2Xml.js
  • Implement dependency scanning to identify fast-xml-parser versions prior to 5.3.8 in your software bill of materials
  • Deploy runtime application self-protection (RASP) solutions to detect recursive function call anomalies

Monitoring Recommendations

  • Configure alerting on Node.js process crashes and restarts in production environments
  • Implement health check monitoring to detect service availability degradation
  • Track CPU and memory utilization spikes that may precede stack overflow crashes

How to Mitigate CVE-2026-27942

Immediate Actions Required

  • Upgrade fast-xml-parser to version 5.3.8 or later immediately
  • If immediate upgrade is not possible, switch to using preserveOrder:false as a temporary workaround
  • Validate and sanitize all input data before passing it to the XML builder function

Patch Information

The vulnerability has been fixed in fast-xml-parser version 5.3.8. The patch adds proper input validation by checking if the input is an array before processing. If non-array values are passed, they are now safely converted to text content rather than triggering recursive processing. The fix can be reviewed in GitHub Pull Request #791 and the GitHub Security Advisory GHSA-fj3w-jwp8-x2g3.

Workarounds

  • Configure XML builder with preserveOrder:false if ordered output is not strictly required
  • Implement input validation to ensure only array data is passed to the builder when using preserveOrder:true
  • Add try-catch blocks around XML builder calls to gracefully handle potential crashes
bash
# Upgrade fast-xml-parser to patched version
npm update fast-xml-parser@5.3.8

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

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechFast Xml Parser

  • SeverityLOW

  • CVSS Score2.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-120
  • Technical References
  • GitHub Commit Update

  • GitHub Pull Request #791

  • GitHub Security Advisory GHSA-fj3w-jwp8-x2g3
  • Related CVEs
  • CVE-2026-25896: fast-xml-parser XSS Vulnerability

  • 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