GitHub Advisoryadvisory · npm

GHSA-cv27-6wvh-8x7j ApostropheCMS: Incomplete CVE-2026-53606: `meta http-equiv=refresh` `content` still ships `javascript:` / `data:` URLs

MEDIUM Published 2026-10-20 Modified 2026-10-20 Official page ↗
Aliases
CVE-2026-113661
Ecosystem
npm
Packages
sanitize-html
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2026-10-20

Affected packages

• npm sanitize-html: < 2.18.0 → fixed in 2.18.0

Description

Summary CVE-2026-53606 expanded `allowedSchemesAppliedToAttributes` so named URL attributes (`action`, `formaction`, `data`, `poster`, `background`, later `ping`, `xlink:href`, …) go through `naughtyHref()`. A URL nested inside `meta` `content` (`http-equiv=refresh`) is not an attribute name on that list, so the embedded destination is never scheme-checked. Default `allowedTags` still omit `meta`. Same non-default integrator config as 53606: allow `meta` plus `http-equiv` / `content`. On 2.17.7: ```text sanitizeHtml( '', { allowedTags: ['meta'], allowedAttributes: { meta: ['http-equiv', 'content'] } } ) // => ``` `data:text/html,…` and arbitrary `https:` destinations also survive. `formaction="javascript:…"` (53606) is stripped. Please Request CVE. Credit: Finder + Reporter (`adrbogacz`). Details `naughtyHref()` only runs when the attribute name is in `allowedSchemesAppliedToAttributes` (`index.js` ~385). Refresh URLs live in a `content` value of the form `0;url=…`, so the gate never fires. Adding `content` to that list wholesale would break ordinary meta `content` (description, viewport). Fix: when `http-equiv` is `refresh` (case-insensitive), parse the `; url=` destination and run `naughtyHref('meta', url)`. Drop `content` (or the tag) if the URL is rejected. Leave other `meta` `content` values alone. PoC Local `[email protected]`. Output inspection only: ```text node -e ' const sanitize = require("sanitize-html"); const opts = { allowedTags: ["meta"], allowedAttributes: { meta: ["http-equiv", "content"] } }; for (const html of [ "", "", "x", ]) { console.log(html, "=>", sanitize(html, html.includes("meta") ? opts : { allowedTags: ["form","button"], allowedAttributes: { button: ["formaction"] } })); } ' ``` Expected: refresh `javascript:` / `data:` remain; 53606 `formaction` is removed. Do not attach a browser hang or stored-XSS page. Impact An integrator who allowed `meta` + `content` expecting `allowedSchemes` to apply (the 53606 configuration pattern) still emits a refresh to `javascript:`, `data:`, or an attacker `https:` URL. Stored XSS / open redirect for viewers of that HTML. Default config is not affected.

Related

Alias · CVE (1)

  • CVE-2026-113661 ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References