MediumGHSA-rjqq-98f6-6j3rCVE-2021-26539

Improper Input Validation in sanitize-html

Published 6 May 2021 · Updated 8 Nov 2023

Affected package

Affected
<2.3.1
Fixed in
2.3.1
Update to the fixed version for your release line, for example:npm install sanitize-html@2.3.1

Details

Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which could allow an attacker to bypass hostname whitelist validation set by the "allowedIframeHostnames" option.

Is GHSA-rjqq-98f6-6j3r in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sanitize-html, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.