Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2023-0842

CVE-2023-0842: Xml2js Prototype Pollution Vulnerability

CVE-2023-0842 is a prototype pollution vulnerability in Xml2js version 0.4.23 that allows attackers to modify object properties via __proto__. This article covers the technical details, affected versions, and mitigation.

Published: February 4, 2026

CVE-2023-0842 Overview

CVE-2023-0842 is a Prototype Pollution vulnerability affecting the xml2js Node.js library version 0.4.23. This vulnerability allows an external attacker to edit or add new properties to an object due to improper validation of incoming JSON keys. Specifically, the application fails to prevent modification of the __proto__ property, enabling attackers to manipulate JavaScript object prototypes.

Critical Impact

Successful exploitation can lead to arbitrary property injection into application objects, potentially enabling denial of service, application logic manipulation, or in certain environments, remote code execution through polluted object prototypes.

Affected Products

  • xml2js version 0.4.23
  • xml2js_project xml2js (all versions prior to patched releases)
  • Applications and services using vulnerable xml2js versions for XML-to-JSON parsing

Discovery Timeline

  • 2023-04-05 - CVE-2023-0842 published to NVD
  • 2025-09-24 - Last updated in NVD database

Technical Details for CVE-2023-0842

Vulnerability Analysis

This vulnerability belongs to the Prototype Pollution (CWE-1321) class of security flaws that affects JavaScript applications. The xml2js library provides functionality for parsing XML documents and converting them to JavaScript objects. During this conversion process, the library fails to adequately sanitize property names extracted from the XML input, allowing attackers to inject malicious keys such as __proto__, constructor, or prototype.

When an attacker crafts malicious XML containing specially named elements that correspond to JavaScript prototype properties, the parsing operation can modify the base Object.prototype. This pollution propagates to all objects in the JavaScript runtime that inherit from the modified prototype, potentially affecting application behavior across the entire codebase.

Root Cause

The root cause stems from insufficient input validation during the XML-to-JavaScript object transformation process. The xml2js library version 0.4.23 does not implement safeguards to filter or reject XML element names that correspond to sensitive JavaScript prototype properties. This oversight allows XML elements named __proto__ to be interpreted as prototype modification instructions rather than regular data properties.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can deliver malicious XML payloads to any application endpoint that processes XML input using the vulnerable xml2js library. The attack is particularly dangerous in server-side Node.js applications where:

  1. User-controlled XML data is parsed by the application
  2. The resulting JavaScript object is used in security-sensitive operations
  3. Multiple requests share the same JavaScript runtime context

Prototype pollution attacks can chain with other application logic to achieve privilege escalation, bypass authentication checks, or manipulate application state. In worst-case scenarios where the polluted properties are used in command construction or code evaluation contexts, remote code execution may be possible.

Detection Methods for CVE-2023-0842

Indicators of Compromise

  • XML payloads containing __proto__, constructor, or prototype as element names in incoming requests
  • Unexpected properties appearing on JavaScript objects that weren't explicitly set by application code
  • Application behavior anomalies following XML parsing operations
  • Error logs indicating type mismatches or unexpected object properties

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block XML payloads containing prototype pollution keywords
  • Deploy application-level logging to capture and analyze XML parsing inputs for suspicious patterns
  • Use runtime application self-protection (RASP) solutions to monitor object property assignments
  • Conduct regular software composition analysis (SCA) scans to identify vulnerable xml2js versions in dependencies

Monitoring Recommendations

  • Monitor application logs for unusual XML parsing errors or unexpected property access patterns
  • Set up alerts for any runtime modifications to Object.prototype in production environments
  • Track dependency versions through automated tooling and alert when vulnerable versions of xml2js are detected
  • Implement network-level monitoring to identify abnormal XML payload sizes or structures

How to Mitigate CVE-2023-0842

Immediate Actions Required

  • Upgrade xml2js to version 0.6.2 or later, which contains the security fix for this vulnerability
  • Audit all applications and services in your environment that may use xml2js as a direct or transitive dependency
  • Implement input validation to reject XML documents containing suspicious element names before parsing
  • Consider using alternative XML parsing libraries with built-in prototype pollution protections

Patch Information

The xml2js maintainers have released version 0.6.2 which addresses this prototype pollution vulnerability. Organizations should update their package.json or package-lock.json files to specify the patched version. For detailed release information, see the GitHub Release Note 0.6.2. Additional details are available in the Fluid Attacks Security Advisory and the Debian LTS Announcement.

Workarounds

  • Implement a pre-processing filter to sanitize XML element names before parsing with xml2js
  • Use Object.freeze() on Object.prototype in Node.js applications to prevent prototype modifications (may cause compatibility issues)
  • Configure xml2js with strict parsing options and validate output objects before use
  • Deploy application-layer input validation to reject XML payloads containing __proto__, constructor, or prototype keywords
bash
# Update xml2js to patched version
npm update xml2js@0.6.2

# Or explicitly set the version in package.json
npm install xml2js@0.6.2 --save

# Verify installed version
npm list xml2js

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechXml2js

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.23%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1321
  • Technical References
  • Fluid Attacks Security Advisory

  • GitHub Project Repository

  • GitHub Release Note 0.6.2

  • Debian LTS Announcement
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | 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