DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.5.0, DOMPurify.sanitize() with SAFE_FOR_TEMPLATES can return attacker-controlled markup whose brace fragments remain separated during sanitization but become adjacent when nested form elements are reparsed through innerHTML. A template engine that compiles the reparsed DOM can evaluate the reconstructed expression, allowing arbitrary JavaScript execution in the page origin. Plain unsplit template expressions remain scrubbed, and exploitation requires the sanitized output to be reparsed and compiled by a template engine. This issue is fixed in version 3.5.0.
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hrxw-jjj6-2g2j DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Thu, 03 Dec 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 03 Dec 2026 17:30:00 +0000

Type Values Removed Values Added
Description DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.5.0, DOMPurify.sanitize() with SAFE_FOR_TEMPLATES can return attacker-controlled markup whose brace fragments remain separated during sanitization but become adjacent when nested form elements are reparsed through innerHTML. A template engine that compiles the reparsed DOM can evaluate the reconstructed expression, allowing arbitrary JavaScript execution in the page origin. Plain unsplit template expressions remain scrubbed, and exploitation requires the sanitized output to be reparsed and compiled by a template engine. This issue is fixed in version 3.5.0.
Title DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed
Weaknesses CWE-1336
CWE-79
References
Metrics cvssV4_0

{'score': 7.6, 'vector': '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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-12-03T20:12:28.413Z

Reserved: 2026-12-03T16:26:33.029Z

Link: CVE-2026-144292

cve-icon Vulnrichment

Updated: 2026-12-03T20:12:24.357Z

cve-icon NVD

Status : Received

Published: 2026-12-03T18:17:26.073

Modified: 2026-12-03T21:18:09.247

Link: CVE-2026-144292

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses