CVE-2021-26540
mediumpriority · track · 22EPSS 0.018 · 78 %ileEUUSEPSS · scored 2026-10-27
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".
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-mjxr-4v3x-q3m4Improper Input Validation in sanitize-html2021-05-06ghsa · osvUS
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".
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (13)
External citations — patches, advisories, analysis.
- https://advisory.checkmarx.net/advisory/CX-2021-4309cnnvd
- https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#232-2021-01-26cnnvd
- https://github.com/apostrophecms/sanitize-html/pull/460cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-26540cnnvd
- https://packetstormsecurity.com/files/164543/Red-Hat-Security-Advisory-2021-3759-01.htmlcnnvd
- https://www.auscert.org.au/bulletins/ESB-2021.2555cnnvd
- https://www.auscert.org.au/bulletins/ESB-2021.3466cnnvd
- https://advisory.checkmarx.net/advisory/CX-2021-4309enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan