Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. GHSA-c6gr-qvv4-5v3f

GHSA-c6gr-qvv4-5v3f: DOMPurify: SMIL attributeName=href guard is skipped when PARSER_MEDIA_TYPE is application/xhtml+xml

October 22, 2026

DOMPurify drops attributeName attributes whose value contains href, so an allowed <animate> or <set> 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 <animate attributeName="href" values="x;javascript:alert(1)">. 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.

References

  • github.com/advisories/GHSA-c6gr-qvv4-5v3f
  • github.com/cure53/DOMPurify/commit/a77a3e78b59f72fa4d1c83f22e121ad9cc7d3575
  • github.com/cure53/DOMPurify/pull/1672
  • github.com/cure53/DOMPurify/releases/tag/3.4.17
  • github.com/cure53/DOMPurify/security/advisories/GHSA-c6gr-qvv4-5v3f

Code Behaviors & Features

Detect and mitigate GHSA-c6gr-qvv4-5v3f with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.4.17

Fixed versions

  • 3.4.17

Solution

Upgrade to version 3.4.17 or above.

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/dompurify/GHSA-c6gr-qvv4-5v3f.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:55 +0000.