Access Restriction Bypass Affecting sanitize-html package, versions <2.3.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.19% (57th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Access Restriction Bypass vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-SANITIZEHTML-1070786
  • published9 Feb 2021
  • disclosed9 Feb 2021
  • creditRon Masas, Checkmarx

Introduced: 9 Feb 2021

CVE-2021-26539  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade sanitize-html to version 2.3.1 or higher.

Overview

sanitize-html is a library that allows you to clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis

Affected versions of this package are vulnerable to Access Restriction Bypass. Internationalized domain name (IDN) is not properly handled. This allows attackers to bypass hostname whitelist validation set by the allowedIframeHostnames option.

References

CVSS Scores

version 3.1