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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-dompurify | no fix listed | DEBIAN-CVE-2026-41239 |
| Debian:13 | node-dompurify | no fix listed | DEBIAN-CVE-2026-41239 |
| Debian:14 | node-dompurify | 3.4.1+dfsg-1 | DEBIAN-CVE-2026-41239 |
| Ubuntu:22.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41239 |
| Ubuntu:24.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41239 |
| Ubuntu:25.10 | node-dompurify | no fix listed | UBUNTU-CVE-2026-41239 |
| Ubuntu:26.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41239 |
| Ubuntu:26.10 | node-dompurify | no fix listed | UBUNTU-CVE-2026-41239 |
| npm | dompurify | 3.4.0 | GHSA-crv5-9vww-q3g8 |
Affected products (as reported)
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
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-crv5-9vww-q3g8 x_refsource_CONFIRM
- https://github.com/cure53/DOMPurify/releases/tag/3.4.0 x_refsource_MISC