CVE-2021-26540: apostrophecms sanitize-html
Vulnerability summary
CVE-2021-26540 is a medium (CVSS 5.3) vulnerability in apostrophecms sanitize-html. EPSS estimates a 1.75% chance of exploitation in the next 30 days, higher than 77.7% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 08-02-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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 metrics
3 scores · 2 sources · 2 versions- OSV · NpmEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS trend
Probability
1.75%
Chance of exploitation in the next 30 days
Percentile
78%
Versus all other CVEs
30-day change
0.00 pp
From 1.75% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (advisory.checkmarx.net)
Maturity: unknown
Weaknesses
CWE · root causeNo weakness data has been published for this record.
Affected systems
Apostrophecms1 product
- sanitize-html< 2.3.2
Npm1 product
- sanitize-html< 2.3.2
2 vendors · 2 products
References
4 links- github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.mdX Refsource MISCWEBRelease NotesThird Party Advisory