CVE-2026-113661: sanitize-html incomplete : meta refresh URL scheme bypass

CVE-2026-113661 · Severity: medium · CVSS 5.4 · Published 2026-10-20

sanitize-html is a library that removes malicious HTML and scripts from user-supplied content. When misconfigured to allow the `meta` tag with `content` attributes, the library fails to block dangerous URL schemes (like `javascript:` and `data:`) embedded in meta refresh directives. An attacker can inject code that steals data or redirects users when their browsers render the page.

Technologies: sanitize-html (npm). Vendors: npm.

Quick answers

Is CVE-2026-113661 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113661 being exploited in the wild.
How severe is CVE-2026-113661?
Medium severity, with a CVSS score of 5.4, published 20 October 2026.
Which products and versions are affected?
Joshwlewis Sanitize-Html 2.17.7 and earlier; sanitize-html (npm) < 2.18.0, SEMVER:introduced=0,fixed=2.18.0.
Is there a fix for CVE-2026-113661?
Yes. sanitize-html (npm): upgrade to 2.18.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-113661 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-113661?
Check whether you run Joshwlewis Sanitize-Html or sanitize-html (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • sanitize-html (npm): upgrade to 2.18.0 or later
    npm install sanitize-html@2.18.0

Technical details

The vulnerability is a bypass of the `naughtyHref()` scheme validator introduced in CVE-2026-53606. That fix validates URL attributes against `allowedSchemes`, but nested URLs within meta `http-equiv="refresh" content="0;url=..."` are not recognized as an attribute name in the `allowedSchemesAppliedToAttributes` list, so the embedded destination URL is never checked. An attacker can embed `javascript:` or `data:` URLs to trigger XSS or redirect to arbitrary HTTPS sites if `allowedSchemes` permits HTTP(S). The fix requires parsing the `; url=` destination when `http-equiv` equals `refresh` (case-insensitive) and validating it through `naughtyHref()`.

Affected products

  • joshwlewis sanitize-html 2.17.7 and earlier

Identifiers

  • CVE-2026-113661
  • GHSA-cv27-6wvh-8x7j

Timeline

  • 2026-10-20: disclosed
  • 2026-10-20: advisory

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.