npm
CVE-2026-116802
DOMPurify: SMIL attributeName=href guard is skipped when PARSER_MEDIA_TYPE is application/xhtml+xml
- Severity
- Low
- Published
- 22 Oct 2026
- Last changed
- 27 Oct 2026
- Added to UpHeron
- 23 Oct 2026
- Fixed in
- 3.4.17
- Exploit chance
- 0.2% in the next 30 daysHigher than 12% of CVEs. EPSS by FIRST, 19 Nov 2026
- Weakness
- Cross-site scripting (CWE-79)
- Also known as
- GHSA-c6gr-qvv4-5v3f
- Sources
- OSV.dev and GitHub
Description
DOMPurify drops attributeName attributes whose value contains href, so an allowed or can't rewrite a link's href after sanitizing. The check compares the attribute name after transformCaseFunc, and that function doesn't lowercase in XHTML mode. In XHTML the attribute is spelled attributeName, so the comparison with "attributename" never matches and the guard does nothing.
An app that uses PARSER_MEDIA_TYPE: 'application/xhtml+xml' and allows animate and attributeName will keep . Clicking the parent link then runs the script.
This needs a non-default config, so going by SECURITY.md, this is a hardening bug rather than a bypass of the default config.
In _sanitizeAttributes (dist/purify.js line 2216 in 3.4.16):
transformCaseFunc is stringToLowerCase for text/html but the identity function for application/xhtml+xml, because XML names are case-sensitive. The XML parser keeps SVG's real name attributeName, so in XHTML mode lcName is attributeName and the branch never runs.
Affected software
| Software | Affected versions |
|---|---|
dompurifynpm · osv:npm:dompurify |
|
About dompurify
- Weekly downloads (npm)
- 100,045,636npm, 15 Nov 2026
Vulnerabilities in dompurify
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 1
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-116804DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modesCritical 22 Oct 2026
- CVE-2026-116803DOMPurify IN_PLACE: hook that removes a parent or sibling leaves the detached subtree's event handlers armed (incomplete fix for GHSA-p98j-92pf-mc4p)High 22 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-116802
- GitHub Advisory Database https://github.com/advisories/GHSA-c6gr-qvv4-5v3f