Skip to main content
CVE-2026-144292VulnerabilityPublished

DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is

Affects dompurifySource GCVE Database

0
Compare
Authoritative record:CVE-2026-144292· High 7.6

Not known to be exploited · CVSS 7.6 High : upgrade to 3.5.0 soon.

Data as of 4 Dec 2026, 00:45 UTC

CVSS 4.0 base score
7.6High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 4.07.6
Patch
Available – fixed in 3.5.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 3 Dec 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Dec 2026.

What to do

Upgrade dompurify to 3.5.0.

Affected software

ProductAffectedFixed in
npmdompurifyAffected
  • <3.5.0
Fixed in
  • 3.5.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in DOMPurify version 3.5.0. Users should upgrade to version 3.5.0 or later to address this vulnerability. Until upgraded, avoid using the SAFE_FOR_TEMPLATES option or apply additional sanitization steps that consider the effects of re-parsing the sanitized output. The vendor suggests approaches such as removing nested <form> elements or re-parsing and re-sanitizing until stable output is achieved.

Description

DOMPurify version 3.4.18 with the SAFE_FOR_TEMPLATES option enabled has a vulnerability where nested <form> elements cause template expressions to reassemble after sanitization and re-parsing. This leads to sanitized output that appears safe but becomes a live template expression when assigned to innerHTML, enabling arbitrary JavaScript execution in template engines like Vue 3 and AngularJS 1.8.3. The issue arises because the sanitizer's checks do not account for how the output is parsed a second time by the consumer, allowing an attacker to bypass the intended protections.

References

Community reviews

Loading reviews…