All vulnerabilities

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
dompurifynpm · osv:npm:dompurify
  • Every version before 3.4.17

About dompurify

Weekly downloads (npm)
100,045,636npm, 15 Nov 2026

References