Vulnerability record · CVE-2021-26540 · published 8 February 2021
CVE-2021-26540: Apostrophecms sanitize-html vulnerability
Apostrophecms · Sanitize Html
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".
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".
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://advisory.checkmarx.net/advisory/CX-2021-4309 | ExploitPatchThird Party Advisory |
| https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#232-2021-01-26 | Release NotesThird Party Advisory |
| https://github.com/apostrophecms/sanitize-html/pull/460 | PatchThird Party Advisory |
| https://advisory.checkmarx.net/advisory/CX-2021-4309 | ExploitPatchThird Party Advisory |
| https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md#232-2021-01-26 | Release NotesThird Party Advisory |
| https://github.com/apostrophecms/sanitize-html/pull/460 | PatchThird Party Advisory |
Track CVE-2021-26540 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-26540), CISA KEV, FIRST EPSS (scores of 2026-09-28). This page is refreshed as NVD updates the record.