Description
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.
Published: 2026-06-12
Score: 5.4 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is an incomplete URI scheme validation in sanitize-html that allows javascript: URIs to pass through the sanitizer when the attributes action, formaction, data, poster, background, ping, xlink:href, dynsrc, or lowsrc are enabled. This weakness, classified as CWE‑79, can be exploited to inject malicious scripts into web pages viewed by users, leading to theft of credentials, session hijacking, or defacement. The affected code has a CVSS score of 5.4, indicating a moderate impact on confidentiality, integrity, and availability when an attacker succeeds.

Affected Systems

All instances of ApostropheCMS that use the sanitize-html package prior to version 2.17.5 are affected. The vulnerability arises when a developer explicitly allows any of the URI‑accepting attributes (action, formaction, data, poster, background, ping, xlink:href, dynsrc, lowsrc) in the sanitization configuration. The default safeguard only covers the href, src, and cite attributes, so developers must be aware of this gap when promoting the library as a full HTML sanitizer.

Risk and Exploitability

The CVSS score of 5.4 reflects a moderate risk profile; the EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers can exploit this flaw by submitting crafted HTML through any interface that forwards content to the sanitizer, such as rich‑text editors or comment fields. Because the flaw resides in the sanitization function, no elevated privileges or authentication are needed. The attack vector is a client‑side injection where malicious javascript: URIs are rendered in the target browser, executing arbitrary code in the context of the site.

Generated by OpenCVE AI on June 12, 2026 at 22:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade sanitize-html to version 2.17.5 or later
  • Remove or prevent use of the attributes action, formaction, data, poster, background, ping, xlink:href, dynsrc, lowsrc from the allowed attribute list, or otherwise ensure they are guarded by the default scheme validation
  • Validate and sanitize any user‑supplied content explicitly, ensuring that javascript: schemes are not present before rendering

Generated by OpenCVE AI on June 12, 2026 at 22:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 12 Jun 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Apostrophecms
Apostrophecms sanitize-html
Vendors & Products Apostrophecms
Apostrophecms sanitize-html

Fri, 12 Jun 2026 21:00:00 +0000

Type Values Removed Values Added
Description 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.
Title sanitize-html has an incomplete URI scheme validation that allows javascript: URIs through action, formaction, data, poster, and background attributes
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}


Subscriptions

Apostrophecms Sanitize-html
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-12T20:50:47.085Z

Reserved: 2026-06-09T19:39:52.404Z

Link: CVE-2026-53606

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-12T21:16:24.093

Modified: 2026-06-12T21:16:24.093

Link: CVE-2026-53606

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-12T22:45:28Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')