CVE-2026-53606: ApostropheCMS sanitize-html XSS via incomplete URI scheme validation

CVE-2026-53606 · Severity: medium · CVSS 5.4 · Published 2026-06-12

A popular HTML sanitization library used in CMS platforms and web editors fails to block malicious 'javascript:' links in certain HTML attributes like form actions and media posters. While the default settings are safe, developers who customize the library to allow forms or advanced media elements may inadvertently allow attackers to execute malicious scripts in users' browsers. This could lead to unauthorized actions being performed on behalf of users or the theft of sensitive session information.

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

Quick answers

Is CVE-2026-53606 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-53606 being exploited in the wild.
How severe is CVE-2026-53606?
Medium severity, with a CVSS score of 5.4, published 12 June 2026.
Which products and versions are affected?
sanitize-html (npm) >= 1.18.0, <= 2.17.4, SEMVER:introduced=1.18.0,fixed=2.17.5.
Is there a fix for CVE-2026-53606?
Yes. sanitize-html (npm): upgrade to 2.17.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-53606 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-53606?
Check whether you run 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.17.5 or later
    npm install sanitize-html@2.17.5

Technical details

The sanitize-html library uses a hardcoded list, 'allowedSchemesAppliedToAttributes', to determine which attributes should undergo URI scheme validation via the 'naughtyHref()' function. By default, this list only includes 'href', 'src', and 'cite'. If a developer configures the library to allow other URI-bearing attributes defined in the HTML specification (such as 'action', 'formaction', 'data', 'poster', or 'background'), the library fails to check them for dangerous schemes like 'javascript:'. An attacker can provide input containing these attributes to execute arbitrary JavaScript when a user interacts with the resulting HTML (e.g., submitting a form). This issue is resolved in version 2.17.5 by expanding the default validation list.

Affected products

  • ApostropheCMS sanitize-html >= 1.18.0, <= 2.17.4

Identifiers

  • CVE-2026-53606
  • GHSA-vccv-cmxp-4j9h

Timeline

  • 2026-06-11: disclosed
  • 2026-07-31: advisory
  • 2026-07-31: patched

References

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