Elevated
DOMPurify SAFE_FOR_TEMPLATES bypass lets template expressions reassemble and run arbitrary JavaScript
CVE-2026-144292
Websites that clean user posts with it can have outside commands run on them.
- CVE
- CVE-2026-144292 (opens in a new tab)
- Score
- CVSS 7.6
- First seen
7.6
Products
Mitigation
Update DOMPurify to 3.5.0 or later.
Summary
With the SAFE_FOR_TEMPLATES option, DOMPurify can return markup whose braces merge when it is parsed again, so a template engine can run attacker JavaScript. Web apps using DOMPurify versions before 3.5.0 are affected.
Exploit code is public
Affected when
- SAFE_FOR_TEMPLATES: true set
- Sanitized output parsed again via innerHTML
- A template engine such as Vue 3 in-DOM templates or AngularJS 1.8.3 compiles the reparsed DOM
1 other Incident of this product in the last 30 days
Incidents by product: DOMPurify
Read the advisory · github.com (opens in a new tab)
- Advisory: github.com (opens in a new tab)
- CVE record: cve.org (opens in a new tab)