Vulnerability · Published Apr 23, 2026 · Assigned by GitHub_M

CVE-2026-41239DOMPurify has a SAFE_FOR_TEMPLATES bypass in RETURN_DOM mode

Medium 6.8

In plain English

A medium-severity cross-site scripting in DOMPurify from cure53. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.8Medium
Exploit odds (30 days)0.2%top 83.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Starting in version 1.0.10 and prior to version 3.4.0, `SAFE_FOR_TEMPLATES` strips `{{...}}` expressions from untrusted HTML. This works in string mode but not with `RETURN_DOM` or `RETURN_DOM_FRAGMENT`, allowing XSS via template-evaluating frameworks like Vue 2. Version 3.4.0 patches the issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-dompurifyno fix listedDEBIAN-CVE-2026-41239
Debian:13node-dompurifyno fix listedDEBIAN-CVE-2026-41239
Debian:14node-dompurify3.4.1+dfsg-1DEBIAN-CVE-2026-41239
Ubuntu:22.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41239
Ubuntu:24.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41239
Ubuntu:25.10node-dompurifyno fix listedUBUNTU-CVE-2026-41239
Ubuntu:26.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41239
Ubuntu:26.10node-dompurifyno fix listedUBUNTU-CVE-2026-41239
npmdompurify3.4.0GHSA-crv5-9vww-q3g8

Affected products (as reported)

VendorProductVersions
cure53 DOMPurify >= 1.0.10, < 3.4.0

Weakness: CWE-79, CWE-1289 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

References