HIGHCVSS v4 7.6Vulnerability

CVE-2026-144292

### Summary With `SAFE_FOR_TEMPLATES: true`, DOMPurify 3.4.18 returns a string that contains no `{{` or `}}`, yet becomes a live `{{…}}` expression as soon as it is assigned to `innerHTML`. A template engine that compiles that DOM (verified with Vue 3 in-DOM templates and AngularJS 1.8.3) evaluates the attacker's expression, giving arbitrary JavaScript execution. The attacker controls only the markup passed to `sanitize()`. The only configuration required is `SAFE_FOR_TEMPLATES: true`, which is a protective option used for its documented purpose. Reproduced on DOMPurify 3.4.18 (npm `latest`) in Chromium 156, Firefox 157 and WebKit 27.2. The plain `{{…}}` case is still scrubbed correctly, so this is a gap in the existing protection. ### Details SAFE_FOR_TEMPLATES is enforced in two places in `src/purify.ts`, and neither accounts for how the returned string is parsed a second time by the consumer. 1. Per text node, during the walk (around line 2122): ```ts /* Sanitize element content to be template-safe */ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) { const content = _stripTemplateExpressions(currentNode.textContent); ... ``` 2. After serialization, a tree scrub that only runs when the serialized output contains a marker (around line 2872): ```ts if ( SAFE_FOR_TEMPLATES && regExpTest(EXPRESSIONS.TMPL_MARKER_SERIALIZED, serializedHTML) ) { _scrubOwnCharacterData(body); serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; } ``` with `TMPL_MARKER_SERIALIZED = /{{|}}|\${|<%|%>|&lt;%|%&gt;/` in `src/regexp.ts`. Input: ```html <form><div>{</form><form>{constructor.constructor('alert(1)')()}</form>} ``` Step 1, first parse (inside DOMPurify). `</form>` clears the parser's form element pointer while the `<div>` is still open, so the second `<form>` is accepted as a child of the `<div>`. The tree has three separate text nodes, `{`, `{…}` and `}`, with an element betwee

Properties

Severity
high
Summary
DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed
Nvd fetched at
2026-12-04T15:00:48.841578+00:00
Epss score
0.01174
Cvss severity
HIGH
Cvss score
7.6
Retrieved at
2026-12-04T15:02:59+00:00
Ghsa published
2026-12-03T23:56:52Z
Source url
https://github.com/advisories/GHSA-hrxw-jjj6-2g2j
Ghsa updated
2026-12-03T23:56:53Z
Ghsa id
GHSA-hrxw-jjj6-2g2j
Last source
FIRST EPSS
Score
7.6
Cvss version
4.0
Cve id
CVE-2026-144292
Cvss 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
First seen by Signal
2026-12-03T18:53:57+00:00
Name
CVE-2026-144292
Is ghsa only
false
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Related Entities (4)

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-144292 (CVSS v4 7.6) — Ninja Signal Threat Intelligence | Ninja Signal