{"id":"CVE-2021-42576","aliases":["CVE-2021-42576","GHSA-x95h-979x-cf3j","GO-2022-0588","PYSEC-2021-849"],"related":[],"kind":"vulnerability","state":"published","title":"Policies not properly enforced in bluemonday","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"The bluemonday HTML sanitizer can leak the contents of a \"style\" element into HTML output, potentially causing XSS vulnerabilities.\n\nThe default bluemonday sanitization policies are not vulnerable. Only user-defined policies allowing \"select\", \"style\", and \"option\" elements are affected.\n\nPermitting 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.","format":"markdown","source":"go"},{"lang":"es","text":"bluemonday sanitizer versiones anteriores a 1.0.16 para Go, y versiones anteriores a 0.0.8 para Python (en pybluemonday), no aplica apropiadamente las políticas asociadas a los elementos SELECT, STYLE y OPTION","source":"nvd"}],"published":"2021-10-18T14:36:43.000Z","modified":"2026-06-17T04:09:51.287Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.8"}],"ecosystem":"PyPI","package":"pybluemonday","purl":"pkg:pypi/pybluemonday","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.16"}],"ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","purl":"pkg:golang/github.com/microcosm-cc/bluemonday","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.16"}],"ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","purl":"pkg:golang/github.com/microcosm-cc/bluemonday","source":"go"},{"ranges":[{"status":"affected","fixed":"1.0.16"}],"vendor":"microco","product":"bluemonday","cpe":"cpe:2.3:a:microco:bluemonday:*:*:*:*:*:go:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"0.0.8"}],"vendor":"python","product":"pybluemonday","cpe":"cpe:2.3:a:python:pybluemonday:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.8"}],"ecosystem":"PyPI","package":"pybluemonday","purl":"pkg:pypi/pybluemonday","source":"pysec"}],"references":[{"url":"https://docs.google.com/document/d/11SoX296sMS0XoQiQbpxc5pNxSdbJKDJkm5BDv0zrX50/","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","go","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42576","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/microcosm-cc/bluemonday/commit/c788a2a4d42e081ad54a31368478820bb4a42fb4","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://docs.google.com/document/d/11SoX296sMS0XoQiQbpxc5pNxSdbJKDJkm5BDv0zrX50","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-x95h-979x-cf3j","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/microcosm-cc/bluemonday","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pybluemonday/PYSEC-2021-849.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0588","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/pybluemonday","tags":["package","web"],"sources":["ghsa","pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-42576","url":"https://www.cve.org/CVERecord?id=CVE-2021-42576","licence":"CVE Terms of Use","modified":"2024-08-04T03:38:49.289Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x95h-979x-cf3j","url":"https://github.com/advisories/GHSA-x95h-979x-cf3j","licence":"CC-BY-4.0","modified":"2024-10-21T20:24:06.367Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0588","url":"https://pkg.go.dev/vuln/GO-2022-0588","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-42576","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42576","licence":"Public domain","modified":"2026-06-17T04:09:51.287Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-849","url":"https://osv.dev/vulnerability/PYSEC-2021-849","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:06.825Z"}],"updatedAt":"2026-11-25T22:58:04.536Z","epss":{"score":0.01564,"percentile":0.76011,"date":"2026-12-01T12:00:22.000Z"}}