🛡️ CVE-2021-42576 — pybluemonday
Description
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality high, integrity high, availability high.
Weakness class
CVE-2021-42576 is classified as CWE-20: Improper Input Validation. The application accepts input without checking that it has the expected form, so malformed values reach code that assumes they are well formed.
Affected software
CVE-2021-42576 is recorded against 2 packages.
- github.com/microcosm-cc/bluemonday
- pybluemonday (fixed in 0.0.8)
Timeline and source
Published on 19 October 2021 and last revised on 21 October 2024. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
References
nvd.nist.gov (Advisory)
github.com (Web)
docs.google.com (Web)
github.com (Advisory)
github.com (Package)
github.com (Web)
pkg.go.dev (Web)
pypi.org (Web)
CVE-2021-42576 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS: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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/microcosm-cc/bluemonday | — | — |
| pybluemonday | — | 0.0.8 |
References
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
Site Security Check
Is pybluemonday part of your stack?
CVE-2021-42576 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.