CVE-2021-26539
JavaScript vulnerability analysis and mitigation

Overview

Apostrophe Technologies sanitize-html before version 2.3.1 contains a security vulnerability related to improper handling of internationalized domain names (IDN). The vulnerability was discovered and disclosed on February 8, 2021, affecting the Node.js-based sanitize-html package. This vulnerability could allow attackers to bypass hostname whitelist validation that is set using the 'allowedIframeHostnames' option (NVD).

Technical details

The vulnerability has been assigned a CVSS v3.1 base score of 5.3 (Medium) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N. The issue specifically relates to the package's failure to properly validate internationalized domain names when checking against the allowedIframeHostnames whitelist. This could potentially allow malicious actors to bypass security controls intended to restrict iframe sources to specific trusted domains (NVD).

Impact

The vulnerability allows attackers to bypass hostname whitelist validation mechanisms, potentially enabling the injection of unauthorized iframe content from untrusted sources. This could lead to security issues such as content injection or cross-frame scripting attacks (Checkmarx Advisory).

Exploitability

The vulnerability is exploitable remotely without requiring authentication or user interaction. An attacker can craft specially formatted internationalized domain names to bypass the hostname validation controls (NVD).

Mitigation and workarounds

The vulnerability was fixed in sanitize-html version 2.3.1. The fix implements the standard WHATWG URL parser to properly handle IDNA (Internationalized Domain Name) validation. Users should upgrade to version 2.3.1 or later to address this security issue (Github Changelog).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-54504HIGH8.8
  • JavaScript logoJavaScript
  • @andrea9293/mcp-documentation-server
NoYesSep 17, 2026
CVE-2026-77615HIGH8.7
  • JavaScript logoJavaScript
  • paella-core
NoYesSep 17, 2026
CVE-2026-91127HIGH8.2
  • JavaScript logoJavaScript
  • @file-viewer/doc
NoYesSep 18, 2026
CVE-2026-77301HIGH7.5
  • JavaScript logoJavaScript
  • adm-zip
NoYesSep 18, 2026
CVE-2026-84992MEDIUM6.1
  • JavaScript logoJavaScript
  • md-editor-v3
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management