Quick answers
- Is CVE-2021-26539 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-26539 being exploited in the wild.
- How severe is CVE-2021-26539?
- Low severity, with a CVSS score of 3.1, published 6 May 2021.
- Which products and versions are affected?
- sanitize-html (npm) SEMVER:introduced=0,fixed=2.3.1.
- Is there a fix for CVE-2021-26539?
- Yes. sanitize-html (npm): upgrade to 2.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-26539 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-26539?
- Check whether you run sanitize-html (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- sanitize-html (npm): upgrade to 2.3.1 or later
npm install sanitize-html@2.3.1
Technical details
The vulnerability is an improper input validation issue (CWE-20) in the sanitize-html library before version 2.3.1. The library fails to properly normalize internationalized domain names (IDN) when validating iframe hostnames against the allowedIframeHostnames whitelist. An attacker can supply an IDN-encoded domain that, when interpreted by the browser, resolves to a different domain than what is validated, bypassing the whitelist check. The attack requires no authentication or special preconditions; any application using the allowedIframeHostnames option is potentially vulnerable. The fix was released in version 2.3.1 (January 22, 2021) and normalizes IDN domains before validation.
Affected products
- Apostrophe Technologies sanitize-html before 2.3.1
Identifiers
- CVE-2021-26539
- GHSA-rjqq-98f6-6j3r
Timeline
- 2021-02-08: disclosed: CVE-2021-26539 published on NVD
- 2021-01-22: patched: Fix released in version 2.3.1