CVE-2021-26539 Improper Input Validation in sanitize-html

Medium 5.3 Published Updated

An attacker can bypass iframe hostname whitelisting in sanitize-html by exploiting internationalized domain name handling flaws.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-26539?

CVE-2021-26539 is a medium-severity vulnerability in n/a, published on 8 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which could allow an attacker to bypass hostname whitelist validation set by the "allowedIframeHostnames" option.

Which versions are affected by CVE-2021-26539?

2 open source packages ship an affected version, including sanitize-html. It affects 1 product.

PackageAffectedFixed in
sanitize-html npmAll versions2.3.1
sanitize-html npmAll versions2.3.1

Products include Apostrophecms Sanitize-Html.

How do I fix CVE-2021-26539?

Upgrade sanitize-html to 2.3.1 or later.

Is CVE-2021-26539 being exploited?

There is no known exploitation of CVE-2021-26539 in the wild and no public exploit code.

Sources

Also known as GHSA-rjqq-98f6-6j3r, ROOT-APP-NPM-CVE-2021-26539.

Is CVE-2021-26539 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free