CVE-2021-29272 Cross-site scripting in bluemonday

Medium 6.1 Published Updated

An attacker can bypass XSS protections in the bluemonday Go library by using uppercase Cyrillic characters to inject scripts.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-29272?

CVE-2021-29272 is a medium-severity cross-site scripting vulnerability in n/a, published on 27 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

bluemonday before 1.0.5 allows XSS because certain Go lowercasing converts an uppercase Cyrillic character, defeating a protection mechanism against the "script" string.

Weakness: CWE-79

Which versions are affected by CVE-2021-29272?

3 open source packages ship an affected version, including github.com/microcosm-cc/bluemonday. It affects 1 product.

PackageAffectedFixed in
github.com/microcosm-cc/bluemonday GoAll versions1.0.5
github.com/microcosm-cc/bluemonday GoAll versions1.0.5
github.com/microcosm-cc/bluemonday GoAll versions1.0.5

Products include Microco Bluemonday.

How do I fix CVE-2021-29272?

Upgrade github.com/microcosm-cc/bluemonday to 1.0.5 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2021-29272 being exploited?

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

Sources

Also known as CLEANSTART-2025-ZP95072, GHSA-3x58-xr87-2fcj, GO-2022-0762, UBUNTU-CVE-2021-29272.

Is CVE-2021-29272 in your software?

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

Check your SBOMs for free