Skip to content

CVE-2021-26540 Improper Input Validation in sanitize-html

MediumCVSS 5.3 EPSS 1.8%
Published
Updated
Exploit status
No public exploit known
Technology
Debian

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".

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
apostrophecms sanitize-html < 2.3.2 2.3.2 Fixed
npm sanitize-html(npm) < 2.3.2 2.3.2 Fixed

Affected products

ProductAffected versionsFixed in
npm sanitize-html(npm) < 2.3.2 2.3.2
apostrophecms sanitize-html < 2.3.2 2.3.2

References