# CVE-2026-140391: DOMPurify before 3.4.18 SAFE_FOR_TEMPLATES Bypass Leading to XSS

- Severity: Medium 5.1 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-12-01T14:29:15.635Z
- Modified: 2026-12-01T22:18:00.997Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

DOMPurify before 3.4.18 contains a SAFE_FOR_TEMPLATES bypass that allows attackers to smuggle template expressions past sanitization using nested form elements or orphaned end tags. When the sanitized output is reparsed via innerHTML, split braces merge into live {{...}} expressions that Vue or AngularJS evaluate, executing attacker JavaScript in victims' browsers.

(As written by CVE List.)

## Affected

- cure53 DOMPurify: before 3.4.18 (not affected: 3.4.18)

## Every score

- VulnCheck: CVSS:4.0 5.1 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- VulnCheck: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/cure53/DOMPurify/security/advisories/GHSA-qm7q-q8h9-jg8q> (exploit, vendor-advisory)
- <https://www.vulncheck.com/advisories/dompurify-before-3.4.18-safe-for-templates-bypass-leading-to-xss> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-140391](https://www.cve.org/CVERecord?id=CVE-2026-140391), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-140391](https://nvd.nist.gov/vuln/detail/CVE-2026-140391), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-140391 · Whole record: https://cve.day/CVE-2026-140391.json · Rebuilt by cve.day 2026-12-01T22:32:15.850Z
