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.1Details
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
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-26539
- Linkgithub.com/apostrophecms/sanitize-html/pull/458
- Linkgithub.com/apostrophecms/sanitize-html/commit/bdf7836ef8f0e5b21f9a1aab0623ae8fcd09c1da
- Linkadvisory.checkmarx.net/advisory/CX-2021-4308
- Packagegithub.com/apostrophecms/sanitize-html
- Linkgithub.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#231-2021-01-22
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.