CWE
20
Advisory Published
CVE Published
Updated

CVE-2021-26540: Input Validation

First published: Tue Jan 26 2021(Updated: )

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".

Credit: cve@mitre.org

Affected SoftwareAffected VersionHow to fix
Apostrophecms Sanitize-html<2.3.2

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is CVE-2021-26540?

    CVE-2021-26540 is a vulnerability in Apostrophe Technologies sanitize-html before 2.3.2 that allows attackers to bypass hostname whitelisting for iframe elements.

  • What is the severity of CVE-2021-26540?

    The severity of CVE-2021-26540 is medium with a CVSS score of 5.3.

  • How does CVE-2021-26540 work?

    CVE-2021-26540 allows attackers to bypass hostname whitelist by setting hostnames through the "allowedIframeHostnames" option when "allowIframeRelativeUrls" is set to true.

  • What software is affected by CVE-2021-26540?

    Apostrophecms sanitize-html versions before 2.3.2 are affected by CVE-2021-26540.

  • How can CVE-2021-26540 be fixed?

    To fix CVE-2021-26540, update Apostrophecms sanitize-html to version 2.3.2 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203