Dev.to Security 🔐 Cybersecurity 👁 2 📖 2 min read

CVE-2026-144292: CVE-2026-144292: Client-Side Template Injection and Cross-Site Scripting in DOMPurify via SAFE_FOR_TEMPLATES…

CVE-2026-144292: Client-Side Template Injection and Cross-Site Scripting in DOMPurify via SAFE_FOR_TEMPLATES Bypass Vulnerability ID: CVE-2026-144292 CVSS Score: 7.6 Published: 2026-12-03 DOMPurify prior to version

CVE-2026-144292: Client-Side Template Injection and Cross-Site Scripting in DOMPurify via SAFE_FOR_TEMPLATES Bypass

Vulnerability ID: CVE-2026-144292
CVSS Score: 7.6
Published: 2026-12-03

DOMPurify prior to version 3.5.0 contains a sanitization bypass in the SAFE_FOR_TEMPLATES configuration mode. By embedding split template expression delimiters across invalid nested

elements, an attacker can evade character data scrubbing during initial sanitization. When the sanitized markup is subsequently re-parsed into the DOM via innerHTML, browser HTML5 parsing rules strip the nested tags and concatenate the split text nodes, reconstructing executable template expressions that trigger Cross-Site Scripting (XSS) in client-side template engines.

TL;DR

A flaw in DOMPurify prior to 3.5.0 allows attackers to bypass the SAFE_FOR_TEMPLATES option using nested tags that split template delimiters across text nodes. Upon re-parsing via innerHTML, the browser drops the invalid form tags and joins the delimiters, enabling Client-Side Template Injection and arbitrary JavaScript execution.

⚠️ Exploit Status: POC

Technical Details

  • CVE ID: CVE-2026-144292 (GHSA-hrxw-jjj6-2g2j)
  • CWE Classification: CWE-79 (Cross-site Scripting) / CWE-1336 (Template Injection)
  • CVSS v4.0 Score: 7.6 High (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N)
  • Attack Vector: Network (Unauthenticated HTML input with SAFE_FOR_TEMPLATES enabled)
  • Affected Versions: DOMPurify < 3.5.0
  • Patched Version: DOMPurify 3.5.0
  • Impact: Client-Side Template Injection & Arbitrary JavaScript Execution (XSS)
  • Exploit & KEV Status: Public PoC Available / Not Listed in CISA KEV

Affected Systems

  • cure53/DOMPurify (< 3.5.0)
  • DOMPurify: < 3.5.0 (Fixed in: 3.5.0)

Code Analysis

Commit: d05b243

Fix SAFE_FOR_TEMPLATES bypass via nested form tags and table foster-parenting (PR #1744)

Exploit Details

  • GitHub: Official regression tests in test/test-suite.js demonstrating SAFE_FOR_TEMPLATES bypass via nested form tags and table foster-parenting.

Mitigation Strategies

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.