Skip to main content

sanitize-html CVE-2026-84371

| EUVDEUVD-2026-69654 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-09-01 GitHub_M GHSA-g8qq-57p8-ggw5
5.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate as low-privilege content contributor
  2. Delivery
    Craft SVG with SMIL animate element using attributeName=href and semicolon-separated values list
  3. Exploit
    Submit content processed by sanitize-html with animation tags enabled
  4. Install
    Leading fragment passes scheme check; javascript: entry survives sanitization
  5. C2
    Stored payload served to victim
  6. Execute
    Victim clicks rendered SVG link
  7. Impact
    JavaScript executes in application's browser origin

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) sanitize-html must be configured with at least one SVG animation element (animate, animateColor, animateMotion, animateTransform, or set) in allowedTags - this is explicitly a non-default, opt-in setting; (2) the attacker must have access to submit or store HTML/SVG content that is processed by the misconfigured sanitizer (CVSS PR:L - an authenticated low-privilege user such as a CMS editor or contributor); (3) a victim must click or activate the sanitized SVG link in a browser (CVSS UI:R). The default sanitize-html configuration does not permit SVG animation elements and is not affected. Applications that accept anonymous SVG submissions with animation enabled face a higher practical risk profile than PR:L implies, as attacker authentication would not be required.

Impact

The vendor-assigned CVSS 3.1 score is 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N). The AC:L metric likely overstates ease of exploitation: the vulnerability activates only when SVG animation elements are explicitly added to allowedTags, which is a non-default, opt-in configuration - the default sanitize-html installation is unaffected. An independent assessment of AC:H better reflects this deployment precondition. PR:L is accurate because the attacker must have content-submission access (a CMS editor, contributor, or similar authenticated role). UI:R reflects the victim-click requirement that prevents mass automated exploitation. No EPSS data was provided and no CISA KEV listing is present; however, a functional proof-of-concept against sanitize-html 2.17.6 and Chromium 150 is publicly disclosed in GHSA-g8qq-57p8-ggw5, materially raising exploitation risk for the narrower population of deployments with SVG animation enabled.

Exploit ScenarioDerived

An attacker with contributor-level access submits a crafted SVG containing <animate attributeName="href" values="#safe;javascript:alert(document.cookie)" dur=".01s" fill="freeze"> to a form processed by a misconfigured sanitize-html instance. The leading #safe fragment satisfies the scheme check, the full values list is stored, and when a victim clicks the rendered link in the browser, the javascript: entry executes the attacker's script in the application's origin. A proof-of-concept reproducing this exact flow is included in the public GHSA advisory and was confirmed against sanitize-html 2.17.6 with Chromium 150.0.7871.124.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 01, 2026

Stored XSS in sanitize-html versions 1.9.0 through 2.17.6 allows authenticated low-privileged users to inject executable JavaScript via SVG SMIL animation elements that survive the library's scheme-policy sanitization. The sanitizer validates the values attribute as a single flat URL, missing that attributeName="href" gives values URI-list semantics under SVG SMIL; a payload of #safe;javascript:alert(1) passes the scheme check on its leading fragment while the javascript: entry survives intact. When a victim clicks the rendered link, the browser resolves the later entry and executes script in the application's origin. A working proof-of-concept is publicly disclosed in the GHSA advisory; no CISA KEV listing at time of analysis.

RemediationAI

Upgrade sanitize-html to version 2.17.7 or later, which rejects attributeName values targeting href or xlink:href on SVG animate and set elements, preventing URI-list bypass. The patch is available at PR #5552 and commit 1135516a1a4a8f9638641c460488a43d8af20081 in the ApostropheCMS repository. If an immediate upgrade is not feasible, remove animate, animateColor, animateMotion, animateTransform, and set from the allowedTags configuration; this eliminates the attack surface entirely with no impact to non-animation SVG content. Do not treat allowedSchemesAppliedToAttributes coverage of the values attribute alone as a sufficient workaround - that is precisely the check being bypassed. Default sanitize-html configurations (which omit SVG animation elements) require no action.

Affected VersionsENISA

Apostrophe 1.9.0, < 2.17.7

Affected Packages

npm sanitize-html fix: 2.17.7
euvd apostrophe_1_9_0 fix: 2.17.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, 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 HTML sanitization library (npm) that strips disallowed tags and attributes from user-provided HTML using a configurable allowlist. The root cause (CWE-79) lies in index.js:371-383, which validates animation value attributes (values, from, to, by) as single flat URLs against allowedSchemesAppliedToAttributes. SVG SMIL animation elements (animate, animateColor, animateMotion, animateTransform, set) support a semicolon-separated values list that, when attributeName targets href or xlink:href, functions as a sequence of URL destinations the browser traverses. The sanitizer lacks awareness of this list semantics: only the first token is scheme-checked, and subsequent entries containing javascript: pass through unmodified. The NVD CPE (cpe:2.3:a:apostrophecms:apostrophe) points to the parent CMS monorepo rather than the standalone sanitize-html npm package, which is the actual vulnerable artifact.

Know when Apostrophecms 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

Vendor (GitHub_M) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.4 MEDIUM

AC:H reflects the non-default SVG animation configuration required to trigger the flaw; all other metrics align with the vendor-assigned vector.

3.1 AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Sep 01, 2026 - 22:03 EUVD
CVE Published
Sep 01, 2026 - 20:51 cve.org
MEDIUM 5.4

DescriptionCVE.org

ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. From version 1.9.0 until version 2.17.7, packages/sanitize-html/index.js validates an animation value attribute as one flat URL and does not recognize that attributeName selecting href or xlink:href gives the sibling values, from, to, or by attribute SVG SMIL URL semantics. In configurations that allow the animate, animateColor, animateMotion, animateTransform, or set elements, a values list can begin with a safe fragment and contain a later executable destination that survives allowedSchemesAppliedToAttributes checking. When the sanitized SVG is rendered, the browser can copy that later destination into the live link, and a victim who activates the link can execute script in the application's origin. This issue is fixed in version 2.17.7.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
sanitize-html npm package has millions of weekly downloads across Node.js apps
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2026-63669 MEDIUM POC
6.5 Aug 17

Integrity bypass in ApostropheCMS page management allows authenticated low-privileged editors to move pages into restric

CVE-2026-63670 MEDIUM POC
6.1 Aug 17

Stored cross-site scripting in ApostropheCMS prior to 2.17.6 enables execution of arbitrary JavaScript in victim browser

CVE-2014-125128 MEDIUM POC
6.1 Sep 08

'sanitize-html' prior to version 1.0.3 is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1), th

CVE-2019-25225 MEDIUM POC
6.1 Sep 08

`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1

CVE-2021-25979 CRITICAL
9.8 Nov 08

Apostrophe CMS versions prior to 3.3.1 did not invalidate existing login sessions when disabling a user account or chang

CVE-2024-21501 MEDIUM POC
5.3 Feb 24

Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and

CVE-2021-26540 MEDIUM POC
5.3 Feb 08

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHos

CVE-2021-26539 MEDIUM POC
5.3 Feb 08

Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which co

CVE-2026-53609 CRITICAL
9.1 Jun 12

Prototype pollution in ApostropheCMS versions up to and including 4.30.0 allows an authenticated editor to poison Object

CVE-2026-53608 HIGH
8.7 Jun 12

Stored cross-site scripting in the @apostrophecms/seo plugin (versions ≤1.4.2) allows any user holding the default edito

CVE-2026-35569 HIGH
8.7 Apr 15

Stored cross-site scripting in ApostropheCMS SEO fields permits an authenticated attacker to inject arbitrary JavaScript

CVE-2026-113711 HIGH
7.5 Oct 20

Unauthenticated HTTP requests to ApostropheCMS import-export module routes before version 3.7.0 can force the server to

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.4 Affected
SUSE Linux Enterprise Micro 5.5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy