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-2026-41238

CVE-2026-41238: DOMPurify Prototype Pollution XSS Vulnerability

CVE-2026-41238 is a prototype pollution-based XSS vulnerability in DOMPurify versions 3.0.1 through 3.3.3 that bypasses sanitization controls. This article covers the technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-41238 Overview

CVE-2026-41238 is a prototype pollution-based Cross-Site Scripting (XSS) bypass vulnerability affecting DOMPurify, a widely-used DOM-only XSS sanitizer for HTML, MathML, and SVG. This vulnerability allows attackers to bypass DOMPurify's sanitization mechanisms when a prior prototype pollution gadget exists in the application, potentially enabling the injection of malicious scripts through custom elements with event handlers.

Critical Impact

Attackers can bypass DOMPurify sanitization to inject arbitrary custom elements with event handlers, enabling XSS attacks on applications relying on DOMPurify for user input sanitization.

Affected Products

  • DOMPurify versions 3.0.1 through 3.3.3
  • Applications using DOMPurify.sanitize() with default configuration
  • Web applications without CUSTOM_ELEMENT_HANDLING option configured

Discovery Timeline

  • 2026-04-23 - CVE CVE-2026-41238 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2026-41238

Vulnerability Analysis

This vulnerability represents a sophisticated XSS bypass that chains prototype pollution with DOMPurify's custom element handling logic. The attack requires a pre-existing prototype pollution vulnerability in the target application, which then enables the bypass of DOMPurify's sanitization. The network-accessible nature of this attack combined with the potential for high confidentiality impact makes it a significant concern for web applications relying on DOMPurify as their primary XSS defense layer.

The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation), which encompasses cross-site scripting vulnerabilities. When successfully exploited, attackers can execute arbitrary JavaScript in the context of the victim's browser session, potentially leading to session hijacking, credential theft, or malicious actions on behalf of the user.

Root Cause

The root cause lies in how DOMPurify handles the CUSTOM_ELEMENT_HANDLING configuration option. When applications use DOMPurify.sanitize() with the default configuration (without explicitly setting CUSTOM_ELEMENT_HANDLING), the library reads tagNameCheck and attributeNameCheck values that can be polluted through Object.prototype.

An attacker who has already achieved prototype pollution in the application can inject permissive regex values into Object.prototype.tagNameCheck and Object.prototype.attributeNameCheck. These injected values cause DOMPurify to incorrectly validate and allow arbitrary custom elements with arbitrary attributes—including dangerous event handlers like onclick, onerror, and onload—to pass through sanitization untouched.

Attack Vector

The attack requires two stages: first, the attacker must exploit a separate prototype pollution vulnerability in the target application to pollute Object.prototype with malicious tagNameCheck and attributeNameCheck regex patterns. These patterns are crafted to match any tag or attribute name, effectively disabling DOMPurify's element and attribute filtering.

Once the prototype is polluted, subsequent calls to DOMPurify.sanitize() will allow custom elements with event handler attributes through the sanitization process. When the sanitized output is inserted into the DOM, the malicious event handlers execute, achieving XSS. The attack can be delivered over the network and requires user interaction (such as viewing a page containing the malicious content), but can affect other origins due to the changed scope characteristic of XSS vulnerabilities.

Detection Methods for CVE-2026-41238

Indicators of Compromise

  • Unexpected custom HTML elements appearing in sanitized output with event handler attributes
  • Prototype pollution patterns in JavaScript logs or error monitoring (e.g., modifications to Object.prototype.tagNameCheck)
  • XSS payloads containing custom elements like <custom-tag onerror="malicious_code"> in web application logs
  • Client-side JavaScript errors related to unexpected object property access patterns

Detection Strategies

  • Implement Content Security Policy (CSP) headers to detect and block inline script execution attempts
  • Monitor for prototype pollution attempts using JavaScript runtime monitoring or security libraries like Object.freeze(Object.prototype)
  • Deploy web application firewalls (WAF) with rules to detect XSS payloads containing custom elements with event handlers
  • Use SentinelOne Singularity XDR to detect anomalous JavaScript execution patterns and prototype manipulation activities

Monitoring Recommendations

  • Enable verbose logging for DOMPurify operations in development and staging environments
  • Monitor client-side error reporting for unexpected prototype property access
  • Implement real-time alerting for CSP violation reports indicating potential XSS attempts
  • Review application dependencies for known prototype pollution vulnerabilities that could enable this attack chain

How to Mitigate CVE-2026-41238

Immediate Actions Required

  • Upgrade DOMPurify to version 3.4.0 or later immediately
  • Audit applications for existing prototype pollution vulnerabilities that could enable this attack
  • Implement explicit CUSTOM_ELEMENT_HANDLING configuration as a defense-in-depth measure
  • Consider freezing Object.prototype in security-critical applications to prevent prototype pollution

Patch Information

The vulnerability is fixed in DOMPurify version 3.4.0. The patch addresses the unsafe reading of tagNameCheck and attributeNameCheck from potentially polluted prototype chains. Organizations should update their DOMPurify dependency through their package manager.

For detailed patch information, refer to the GitHub Release Notes and the GitHub Security Advisory.

Workarounds

  • Explicitly configure CUSTOM_ELEMENT_HANDLING with restrictive tagNameCheck and attributeNameCheck functions that do not rely on prototype chain lookups
  • Implement prototype pollution protection by freezing Object.prototype using Object.freeze(Object.prototype) before any user-controlled JavaScript executes
  • Use strict Content Security Policy headers to mitigate the impact of successful XSS bypass
  • Validate and sanitize all user inputs at multiple layers, not relying solely on client-side sanitization
bash
# Update DOMPurify using npm
npm update dompurify@3.4.0

# Or install the specific patched version
npm install dompurify@3.4.0 --save

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechDompurify

  • SeverityMEDIUM

  • CVSS Score6.9

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Release Notes

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-41240: DOMPurify XSS Vulnerability

  • CVE-2026-41239: DOMPurify XSS Vulnerability

  • CVE-2026-0540: Cure53 DOMPurify XSS Vulnerability

  • CVE-2024-48910: Cure53 DOMPurify 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