Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted SVG with attributeName xlink:href:x
-
DeliveryBypass allowedSchemes in non-default sanitizer config
-
ExploitPayload stored/reflected as animate element
-
ExecutionVictim clicks animated link in current Chrome
-
Impactjavascript: URI executes in victim session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Not exploitable against default sanitize-html options - the advisory confirms default configs strip the payload. Exploitation requires a configuration that allows SVG animation: either allow-all (allowedTags:false, allowedAttributes:false) with allowedSchemes limited to http/https, or an allowlist that adds svg and animate/set plus the href, attributeName and values attributes, or the documented case-preserving SVG setup (lowerCaseTags/lowerCaseAttributeNames false) with those tags allowed - in all cases allowedSchemes must exclude javascript: (otherwise the bypass is moot). Further limiting factors: the attack needs victim user interaction (clicking the animated link) and a browser that applies the SMIL animation - the reporter confirmed current Chrome 156 applies it while Chrome 137 produced identical sanitized output but did not animate, so browser version materially affects whether script runs. |
| Impact | All decision signals point the same way: this is a genuine but low-priority issue, not a high-CVSS-low-risk mismatch. The vendor CVSS 4.0 base score is 2.3 (low), driven by AC:H, AT:P, UI:P and only Low confidentiality/integrity impact, and the vuln.today decision label is 'monitor'. It is not in CISA KEV (no confirmed active exploitation), and no EPSS score is provided in the input, so widespread-exploitation probability cannot be quantified here. A detailed, reporter-verified PoC is embedded in the GHSA advisory, so exploitability is proven in a lab, but real-world impact is gated by three stacking preconditions: the target app must run a non-default sanitize-html configuration that allows SVG animate/set with attributeName and values, the victim must click the animated link, and the victim's browser must actually apply the SMIL animation (current Chrome does; Chrome 137 did not). The one cross-source discrepancy worth noting is the CWE: NVD/input lists CWE-184 (Incomplete List of Disallowed Input) while the GHSA advisory lists CWE-79 (XSS) - both are defensible for this allowedSchemes-bypass and it does not change the risk picture. Net: patch on a normal maintenance cadence; treat as elevated only if you knowingly allow SVG animation elements in sanitized untrusted HTML. |
| Exploit ScenarioDerived | An attacker submits untrusted HTML (e.g. a comment or rich-text field) to an application that runs sanitize-html 2.17.7-2.18.1 configured to permit SVG animate/set elements. The sanitizer fails to strip an <animate> whose attributeName is 'xlink:href:x' with values='javascript:alert(1)', so the payload survives into stored/reflected output; when a victim using current Chrome clicks the animated link, the javascript: URI executes in their session. A full working PoC (Puppeteer script plus reproduction output) is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 04, 2026
sanitize-html 2.17.7 through 2.18.1 lets an HTML sanitizer allowlist be bypassed when SVG animation elements are permitted: an <animate> or <set> element whose attributeName carries an extra colon (for example "xlink:href:x") survives sanitization even though href and xlink:href spellings are stripped, and a browser that applies the SMIL animation then resolves the animated link target to a javascript: URL supplied in the values attribute, running script when a victim clicks the link. Only non-default configurations are affected - the library's default options strip the payload entirely - and exploitation additionally requires victim interaction and a browser that applies the animation (reporter's Chrome 156 did; Chrome 137 produced identical sanitized output but did not animate). Exploitation has not been observed in the wild, no CISA KEV entry exists, and public PoC material accompanying the advisory provides a reference reproduction rather than verified working exploit code; priority signals are low (CVSS 4.0 score 2.3, vuln.today decision label 'monitor').
RemediationAI
Upgrade sanitize-html to 2.18.2, the vendor-released fixed version (npm install sanitize-html@2.18.2), which normalises attributeName so prefixed or multi-colon spellings that resolve to a URL attribute are handled like href/xlink:href; the fix commit is https://github.com/apostrophecms/apostrophe/commit/bd727d101de798d574196173f3cbc4f9aaedb3f7 and details are in GHSA-8g6g-w2rq-xcmc. Because only configurations that allow SVG animation are exposed, an immediate compensating control is to remove animate and set from allowedTags (and, where practical, svg and its animation attributes) in every sanitization profile - the trade-off is that legitimate SMIL animation in user-submitted SVG stops rendering, and default-option users need no change since the payload is already stripped. Keeping javascript: out of allowedSchemes remains necessary but is not sufficient on its own, as this bypass defeats exactly that check; applications that must keep SVG animation can additionally reject or filter attributeName values containing more than one colon, at the cost of hand-maintaining a validation rule the patched release already implements. Browser-side exposure varies by version, so patching the library rather than relying on client behaviour is the durable fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
sanitize-html is a Node.js/npm HTML sanitizer widely used to clean untrusted markup before rendering; it works through allowlists for tags, attributes and URL schemes (allowedSchemes). The flaw is classified CWE-184 (incomplete list of disallowed inputs), and the GitHub advisory cross-lists it as CWE-79 (cross-site scripting). SMIL animation elements animate/set retarget another attribute through their attributeName attribute; the earlier fix GHSA-374f-7chj-9948 removed animate/set when attributeName was exactly href or xlink:href. That check was never normalised the way a browser normalises the value: a string such as "xlink:href:x" has an extra colon, is not treated as a URL-bearing attribute by the sanitizer, and is therefore retained together with values="javascript:alert(1)". Chrome resolves the local name to xlink:href, so the anchor's href.animVal becomes javascript:alert(1) and a click executes the script. The vulnerable path depends on configuration: allow-all (allowedTags:false, allowedAttributes:false with allowedSchemes limited to http/https), an allowlist that adds svg, animate (or set), a, and the animate attributes href, attributename and values, or the documented case-preserving SVG setup (lowerCaseTags:false, lowerCaseAttributeNames:false) with those tags allowed - in every case a scheme allowlist that already excludes javascript: is what the bypass defeats. The upstream fix commit in the apostrophe monorepo also bundles unrelated Apostrophe changesets, so it is a batch release rather than an isolated one-line patch.
Know when Sanitize Html gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Remote via submitted HTML (AV:N, PR:N); AC:H because success depends on a non-default sanitizer config and a browser that applies the animation; UI:R for the click; S:C with Low C/I for script in the victim's browser.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
sanitize-html 2.17.7 before 2.18.2 contains a cross-site scripting vulnerability that allows attackers to bypass allowedSchemes by supplying SVG animation attributeName values with multiple colons. Attackers can submit markup like attributeName xlink:href:x with javascript: URLs in values, from, or to attributes, executing script when victims click the animated link.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Sanitize Html
View all'sanitize-html' prior to version 1.0.3 is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1), th
`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1
Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and
Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHos
Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which co
The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure gl
Cross-site scripting (XSS) in ApostropheCMS 4.28.0 and sanitize-html 2.17.1 allows remote attackers to bypass HTML tag f
Stored cross-site scripting can occur in sites using sanitize-html before 2.18.0 when a non-default allow-list permits m
Cross-site scripting in sanitize-html prior to 2.17.5 allows low-privileged attackers to inject executable `javascript:`
Stored cross-site scripting in sanitize-html before 2.18.0 occurs only when the sanitizer is configured with a non-defau
Unbounded recursive re-sanitization in sanitize-html 2.18.0 allows remote attackers to exhaust the Node.js call stack an
sanitize-html 2.17.7 and later before 2.18.0 can bypass SMIL URL protection when an application opts into a non-default
EUVD-2026-144271
NVD
CVE.org
GitHub
VulDB
Exploit-DB