Skip to content
OpenAdvisories
Medium · 5.3 CVE-2021-26540 EUVD-2021-1141GHSA-mjxr-4v3x-q3m4

Improper Input Validation in sanitize-html

Published Feb 8, 2021 · Updated Aug 3, 2024 · Assigned by mitre

Description

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHostnames" option when the "allowIframeRelativeUrls" is set to true, which allows attackers to bypass hostname whitelist for iframe element, related using an src value that starts with "/\\example.com".

Affected packages

EcosystemPackageAffectedFixedRecord
npm sanitize-html < 2.3.2 2.3.2 GHSA-mjxr-4v3x-q3m4

References