Every CVE Search/ Get API key

CVE-2021-42576

Policies not properly enforced in bluemonday

9.8 CriticalFix available

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.56%Up 1.1 points since Oct 19, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
CVE-2021-42576
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Updated
2026-11-02
CVE List No score

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
CVE-2021-42576
Updated
2026-11-02
EUVDEUVD-2021-0205 No score

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
EUVD-2021-0205
Updated
2026-11-03
GitHub AdvisoriesGHSA-x95h-979x-cf3j 8.1

Policies not properly enforced in bluemonday

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
GHSA-x95h-979x-cf3j
CVSS 4.0
8.1 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSV 9.8

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
CVE-2021-42576
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-42576 9.8

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
DEBIAN-CVE-2021-42576
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-x95h-979x-cf3j 8.1

Policies not properly enforced in bluemonday

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
GHSA-x95h-979x-cf3j
CVSS 4.0
8.1 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVUBUNTU-CVE-2021-42576 9.8

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
UBUNTU-CVE-2021-42576
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGO-2022-0588 No score

Cross-site scripting via leaked style elements in github.com/microcosm-cc/bluemonday

The bluemonday HTML sanitizer can leak the contents of a "style" element into HTML output, potentially causing XSS vulnerabilities.

The default bluemonday sanitization policies are not vulnerable. Only user-defined policies allowing "select", "style", and "option" elements are affected.

Permitting the "style" element in policies is hazardous, because bluemonday does not contain a CSS sanitizer. Newer versions of bluemonday suppress "style" and "script" elements even when allowed by a policy unless the policy explicitly requests unsafe processing.

Record
GO-2022-0588
Updated
2026-11-02
OSVPYSEC-2021-849 No score

The bluemonday sanitizer before 1.0.16 for Go, and before 0.0.8 for Python (in pybluemonday), does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Record
PYSEC-2021-849
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pybluemonday
PyPI
before 0.0.8
0.0.8
github.com/microcosm-cc/bluemonday
Go
before 1.0.16
1.0.16
golang-github-microcosm-cc-bluemonday
Debian:12
before 1.0.16-1
1.0.16-1
golang-github-microcosm-cc-bluemonday
Debian:13
before 1.0.16-1
1.0.16-1
golang-github-microcosm-cc-bluemonday
Debian:14
before 1.0.16-1
1.0.16-1
pybluemonday
PyPI
before 0.0.8, plus listed versions
0.0.10.0.20.0.30.0.40.0.50.0.60.0.7
0.0.8
golang-github-microcosm-cc-bluemonday
Ubuntu:18.04:LTS
All versions, plus listed versions
0.0~git20161202.0.e797637-10.0~git20161202.0.e797637-1.1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-42576 is a critical vulnerability (CVSS 9.8) in Microco Bluemonday, published October 18, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.56%, the 75th percentile. Fixed in pybluemonday 0.0.8.

References

Show 5 moreShow less
MoveEnter Open