A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-41239

CVE-2026-41239: DOMPurify XSS Vulnerability

CVE-2026-41239 is a cross-site scripting vulnerability in DOMPurify that bypasses template expression sanitization when using DOM return modes. This article covers technical details, affected versions, and mitigation.

Updated: May 14, 2026

CVE-2026-41239 Overview

CVE-2026-41239 is a cross-site scripting (XSS) vulnerability [CWE-79] in DOMPurify, a widely deployed DOM-only sanitizer for HTML, MathML, and SVG. The flaw affects versions from 1.0.10 up to but not including 3.4.0. The SAFE_FOR_TEMPLATES option, which is intended to strip {{...}} template expressions from untrusted markup, behaves correctly in string mode but fails when callers use the RETURN_DOM or RETURN_DOM_FRAGMENT return modes. Applications that pass sanitized DOM nodes into client-side template engines such as Vue 2 can therefore execute attacker-controlled expressions. Version 3.4.0 patches the issue.

Critical Impact

Attackers can inject template expressions that bypass DOMPurify sanitization and execute arbitrary JavaScript in user browsers when sanitized DOM nodes are rendered through template-evaluating frameworks.

Affected Products

  • DOMPurify versions 1.0.10 through 3.3.x
  • Applications consuming DOMPurify with RETURN_DOM: true or RETURN_DOM_FRAGMENT: true and SAFE_FOR_TEMPLATES: true
  • Downstream frameworks evaluating mustache-style expressions, including Vue 2

Discovery Timeline

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

Technical Details for CVE-2026-41239

Vulnerability Analysis

DOMPurify sanitizes untrusted HTML, MathML, and SVG before insertion into the DOM. The SAFE_FOR_TEMPLATES flag exists to neutralize template syntax such as {{ expression }} so downstream template engines do not interpret attacker input. The sanitizer applies expression stripping to the serialized string output path. The DOM output path, returned when callers request RETURN_DOM or RETURN_DOM_FRAGMENT, does not apply the same removal logic to text nodes. An attacker who submits markup containing {{...}} sequences sees those sequences preserved verbatim inside the returned DOM. When the host application attaches that DOM into a template-aware framework, the framework evaluates the expressions as code, producing XSS.

Root Cause

The root cause is inconsistent enforcement of the SAFE_FOR_TEMPLATES policy across DOMPurify return modes. String serialization paths perform the template expression scrub, while the DOM and DOM fragment paths return nodes whose text content retains the unmodified {{...}} payloads. The defect is documented in the GitHub Security Advisory GHSA-crv5-9vww-q3g8.

Attack Vector

Exploitation requires the attacker to deliver crafted HTML to an application that sanitizes input with DOMPurify using SAFE_FOR_TEMPLATES in combination with RETURN_DOM or RETURN_DOM_FRAGMENT, then mounts the result into a template-evaluating framework. The attack is network-reachable through any input surface that accepts HTML, such as comments, messages, or profile fields. User interaction is required because the victim must load the page that renders the sanitized DOM. Successful exploitation runs arbitrary JavaScript under the application origin and can be used to steal session tokens, perform actions on behalf of the user, or pivot to additional attacks.

Detection Methods for CVE-2026-41239

Indicators of Compromise

  • Inbound HTML payloads containing {{ and }} delimiters surrounding JavaScript expressions, function calls, or constructor references.
  • Client-side errors or unexpected execution originating from Vue 2 template compilation on user-generated content surfaces.
  • Outbound requests from rendered pages to attacker-controlled domains immediately after content load.

Detection Strategies

  • Inventory all uses of DOMPurify in front-end and server-side rendering code and identify call sites that combine SAFE_FOR_TEMPLATES with RETURN_DOM or RETURN_DOM_FRAGMENT.
  • Add server-side input inspection that flags submissions containing mustache-style template expressions in HTML fields.
  • Use software composition analysis to identify DOMPurify versions below 3.4.0 across repositories and built artifacts.

Monitoring Recommendations

  • Monitor browser-side error telemetry and Content Security Policy (CSP) violation reports for unexpected script execution on pages rendering user content.
  • Log and alert on Web Application Firewall (WAF) matches against {{.*}} patterns submitted to HTML-accepting endpoints.
  • Track dependency manifests for regressions that downgrade DOMPurify below 3.4.0.

How to Mitigate CVE-2026-41239

Immediate Actions Required

  • Upgrade DOMPurify to version 3.4.0 or later across all applications and bundles.
  • Audit sanitizer configurations for use of SAFE_FOR_TEMPLATES together with RETURN_DOM or RETURN_DOM_FRAGMENT and remediate any matches.
  • Review Vue 2 and other template-evaluating views that render sanitized HTML from untrusted sources.

Patch Information

The maintainers released the fix in DOMPurify 3.4.0. Release notes and the patched build are available in the GitHub DOMPurify Release 3.4.0 and the GitHub Security Advisory GHSA-crv5-9vww-q3g8.

Workarounds

  • Switch affected call sites to string mode and parse the sanitized string back into DOM nodes only after sanitization completes.
  • Disable client-side template evaluation on content paths that render user-supplied HTML, or migrate from Vue 2 templating of untrusted markup.
  • Apply a strict Content Security Policy that blocks inline script execution to reduce impact if exploitation occurs.
bash
# Configuration example
npm install dompurify@^3.4.0
npm ls dompurify

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.8

  • EPSS Probability0.05%

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

  • GitHub Security Advisory GHSA-crv5-9vww-q3g8
  • Related CVEs
  • CVE-2026-41240: DOMPurify XSS Vulnerability

  • CVE-2026-41238: DOMPurify Prototype Pollution 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 Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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