Intel

AIKIDO-2026-864217

dompurify is vulnerable to Cross-Site Scripting (XSS)

GHSA-c6gr-qvv4-5v3fPublished Oct 19, 2026
October 19, 2026

37

CVE Score

Low

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

DOMPurify's SMIL attributeName="href" guard compares the attribute name after transformCaseFunc, which lowercases names in HTML mode but is the identity function in XHTML mode because XML names are case sensitive. In an application/xhtml+xml document the attribute keeps its camelCase spelling attributeName, so the comparison against the lowercase literal never matches and the guard never strips it. An allowed <animate> or <set> element can then carry attributeName="href" with a javascript: payload hidden in a semicolon separated values list, which SMIL applies as the parent link's effective href. The fix lowercases the attribute name consistently so XHTML mode is checked the same way as HTML mode.

How do I fix this?

Upgrade the dompurify library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you set PARSER_MEDIA_TYPE to application/xhtml+xml while allowing the attributeName attribute on SVG animate or set elements.

Package

Versions

0.0.1 - 3.4.16

Fixed in 3.4.17

Background info

dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 3.4.16.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea