Skip to main content
Vulnerability Database/CVE-2026-113657

CVE-2026-113657: sanitize-html SMIL XSS Vulnerability

CVE-2026-113657 is a cross-site scripting vulnerability in sanitize-html that allows attackers to bypass SMIL URL protection through namespace-prefixed SVG elements. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-113657 Overview

CVE-2026-113657 is a cross-site scripting (XSS) vulnerability [CWE-79] in the sanitize-html module used by ApostropheCMS, an open-source Node.js content management system. The flaw affects sanitize-html versions 2.17.7 through versions prior to 2.18.0. Applications that permit namespace-prefixed SVG animation elements and relevant URL-targeting attributes can bypass the SMIL (Synchronized Multimedia Integration Language) URL protection. Prefixed tag names fail to match the unprefixed animation-element check, allowing a sanitized SVG to rewrite a link destination to an unsafe URI. Script execution occurs when a user activates the affected link. The default sanitizer configuration is not unconditionally affected.

Critical Impact

An attacker who can submit HTML through a vulnerable configuration can inject a malicious SVG that redirects a link to a javascript: URI, resulting in script execution in the victim's browser upon interaction.

Affected Products

  • ApostropheCMS using sanitize-html versions 2.17.7 through 2.17.x
  • Applications with custom sanitize-html configurations allowing namespace-prefixed SVG animation elements
  • Applications permitting URL-targeting attributes on prefixed SVG animation tags

Discovery Timeline

  • 2026-10-20 - CVE-2026-113657 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-113657

Vulnerability Analysis

The vulnerability resides in how sanitize-html identifies SVG animation elements when enforcing SMIL URL protections. The sanitizer checks tag names against an unprefixed list of animation elements such as animate and set. When an application configuration permits namespace-prefixed variants, for example svg:animate, the string comparison fails and the SMIL protection is skipped.

An attacker who supplies crafted SVG markup can target URL-bearing attributes on these prefixed animation elements. The attribute values are not blocked, so the attacker can rewrite the href of an enclosing link to a dangerous scheme such as javascript:. The payload persists through sanitization and renders in the target page.

Script execution requires user interaction: the victim must activate the rewritten link. This user-interaction requirement, combined with the need for a non-default sanitizer configuration, narrows the exploitation surface. The EPSS probability for exploitation stands at 0.313%.

Root Cause

The root cause is an incomplete tag-name allowlist check. The animation-element guard compares raw tag strings without stripping XML namespace prefixes. Any configuration that enables prefixed SVG tags therefore bypasses the SMIL URL protection logic.

Attack Vector

Exploitation requires network-delivered content, low privileges to submit HTML, and user interaction to activate the modified link. The attacker crafts an SVG that uses a namespace-prefixed animation element with URL-targeting attributes, submits it through a content field, and waits for a user to click the resulting link.

text
// Patch reference (sanitize-html@2.18.0 release in apostrophecms/apostrophe)
// Normalizes tag names before the animation-element check so that
// namespace-prefixed variants (for example svg:animate) are evaluated
// against the same SMIL URL protection as unprefixed tags.

Source: ApostropheCMS Release Note sanitize-html@2.18.0

Detection Methods for CVE-2026-113657

Indicators of Compromise

  • SVG payloads containing namespace-prefixed animation elements such as <svg:animate>, <svg:set>, or <svg:animateTransform> in user-generated content
  • SVG <a> elements whose href or xlink:href resolves to javascript: after rendering
  • Stored HTML in CMS content fields referencing attributeName="href" or attributeName="xlink:href" on animation tags

Detection Strategies

  • Inventory ApostropheCMS deployments and inspect sanitize-html versions; flag any installation between 2.17.7 and 2.18.0
  • Review sanitize-html configuration objects for allowed tags that include namespace-prefixed SVG elements
  • Scan stored content for SVG markup combining animation elements with URL-targeting attributes

Monitoring Recommendations

  • Alert on browser console errors or Content Security Policy violations tied to javascript: URI navigation from CMS-rendered pages
  • Log and review HTML submissions to content endpoints for SVG payloads with namespace prefixes
  • Track outbound referrer anomalies from CMS-hosted pages that may indicate successful link rewrites

How to Mitigate CVE-2026-113657

Immediate Actions Required

  • Upgrade sanitize-html to version 2.18.0 or later across all ApostropheCMS projects
  • Audit custom sanitize-html configurations and remove namespace-prefixed SVG animation elements from the allowed tags list
  • Re-sanitize existing stored content to strip malicious SVG payloads that may have been persisted before patching

Patch Information

The issue is fixed in sanitize-html 2.18.0. Review the fix commits in the ApostropheCMS repository: commit 9500b8b and commit f84fd41. Full advisory details are available in GitHub Security Advisory GHSA-374f-7chj-9948.

Workarounds

  • Restrict sanitize-htmlallowedTags to the default set and explicitly disallow namespace-prefixed SVG elements
  • Deploy a strict Content Security Policy that blocks javascript: URIs in navigation and inline event handlers
  • Disable SVG uploads and rich SVG embedding in user-generated content until the patched version is deployed
bash
# Upgrade sanitize-html to the fixed release
npm install sanitize-html@2.18.0

# Verify the installed version
npm ls sanitize-html

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.