CVE-2021-26540Apostrophecms Sanitize-html
Medium 5.3 No auth needed
Follow: this CVE · Apostrophecms · Apostrophecms Sanitize-html We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- 1.8% probability of exploitation in 30 days · percentile 79
- Auth required
- No
- Published
- Feb 8, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
What happens
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".
What to do
- Apply the vendor's security update for Sanitize-html.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | sanitize-html |
< 2.3.2 |
2.3.2 |
npm install sanitize-html@2.3.2 |
Per OSV / GitHub Advisories (GHSA-mjxr-4v3x-q3m4). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| apostrophecms | sanitize-html | < 2.3.2 |
Official sources
References
Links published by the sources. Open them with care.
- advisory.checkmarx.net Exploit Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Patch Third Party Advisory