What’s Vulnerable › Vulnerabilities
CVE-2021-26540
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-02-08 · updated 2026-06-17
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 products
- apostrophecms sanitize-html: before 2.3.2 — fixed in 2.3.2
How to fix
Upgrade to a fixed version: apostrophecms sanitize-html 2.3.2. Check the vendor advisory for mitigations.
References
- https://advisory.checkmarx.net/advisory/CX-2021-4309
- https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#232-2021-01-26
- https://github.com/apostrophecms/sanitize-html/pull/460
- https://advisory.checkmarx.net/advisory/CX-2021-4309
- https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#232-2021-01-26
- https://github.com/apostrophecms/sanitize-html/pull/460
Get alerted when CVE-2021-26540 or the next vulnerability affects your stack