CVE-2021-26540

sanitize-html: improper validation of hostnames set by the "allowedIframeHostnames" option can lead to bypass hostname whitelist for iframe element

Published Feb 8, 2021 CVSS 3.1 · 5.3 Medium EPSS 1.8% KEV · Not listed
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".

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-1141 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".
Github GHSA Github GHSA GHSA-mjxr-4v3x-q3m4 Improper Input Validation in sanitize-html
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 3, 2024, 8:26 PM
Reserved
Feb 1, 2021, 12:00 AM
Status
Modified
Published
Feb 8, 2021, 5:15 PM
Modified
Jun 17, 2026, 3:43 AM
Severity
Moderate
Public date
Jan 26, 2021, 12:00 AM