{"id":"CVE-2021-42576","aliases":["DEBIAN-CVE-2021-42576","EUVD-2021-0205","GHSA-x95h-979x-cf3j","GO-2022-0588","PYSEC-2021-849","UBUNTU-CVE-2021-42576"],"status":"published","title":"Policies not properly enforced in bluemonday","description":"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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.01564,"percentile":0.75448,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2021-10-18T14:36:43Z","modified":"2026-10-24T10:30:22Z","fixes":[{"ecosystem":"PyPI","package":"pybluemonday","fixed_in":["0.0.8"],"sources":["ghsa","osv"]},{"ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","fixed_in":["1.0.16"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"golang-github-microcosm-cc-bluemonday","fixed_in":["1.0.16-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"golang-github-microcosm-cc-bluemonday","fixed_in":["1.0.16-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"golang-github-microcosm-cc-bluemonday","fixed_in":["1.0.16-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pybluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.8"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.16"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"golang-github-microcosm-cc-bluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.16-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"golang-github-microcosm-cc-bluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.16-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"golang-github-microcosm-cc-bluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.16-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"pybluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.8"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7"]},{"source":"osv","ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.16"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/microcosm-cc/bluemonday","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.16"}]}]},{"source":"osv","ecosystem":"PyPI","package":"pybluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.8"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"golang-github-microcosm-cc-bluemonday","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0~git20161202.0.e797637-1","0.0~git20161202.0.e797637-1.1"]}],"products":[{"vendor":"microco","product":"bluemonday"},{"vendor":"python","product":"pybluemonday"}],"references":[{"url":"https://docs.google.com/document/d/11SoX296sMS0XoQiQbpxc5pNxSdbJKDJkm5BDv0zrX50/","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42576","tags":["advisory"]},{"url":"https://github.com/microcosm-cc/bluemonday/commit/c788a2a4d42e081ad54a31368478820bb4a42fb4","tags":["web","fix"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0588","tags":["web"]},{"url":"https://docs.google.com/document/d/11SoX296sMS0XoQiQbpxc5pNxSdbJKDJkm5BDv0zrX50","tags":["web"]},{"url":"https://github.com/advisories/GHSA-x95h-979x-cf3j","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pybluemonday/PYSEC-2021-849.yaml","tags":["web"]},{"url":"https://pypi.org/project/pybluemonday","tags":["web","package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-42576","tags":["advisory"]},{"url":"https://github.com/microcosm-cc/bluemonday","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-42576","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-42576","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-42576","description":"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.","status":"published","published":"2021-10-18T14:36:43Z","modified":"2024-08-04T03:38:49.289Z","updated_at":"2026-11-02T14:32:58.739039Z"}],"euvd":[{"id":"EUVD-2021-0205","description":"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.","status":"published","published":"2021-10-18T14:36:43Z","modified":"2024-08-04T03:38:49Z","updated_at":"2026-11-03T03:24:15.755984Z"}],"ghsa":[{"id":"GHSA-x95h-979x-cf3j","title":"Policies not properly enforced in bluemonday","description":"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.","status":"published","published":"2021-10-19T20:15:30Z","modified":"2024-10-21T20:18:43Z","cvss":[{"version":"4.0","score":8.1,"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","level":"high"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:38:12.325695Z"}],"nvd":[{"id":"CVE-2021-42576","description":"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.","status":"published","published":"2021-10-18T15:15:07.823Z","modified":"2026-06-17T04:09:51.287Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"updated_at":"2026-11-02T14:06:59.689345Z"}],"osv":[{"id":"CVE-2021-42576","description":"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.","status":"published","published":"2021-10-18T15:15:07.823Z","modified":"2026-10-24T10:30:22.510608868Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:21.557945Z"},{"id":"DEBIAN-CVE-2021-42576","description":"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.","status":"published","published":"2021-10-18T15:15:07.823Z","modified":"2026-10-23T18:03:51.421641821Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.799676Z"},{"id":"GHSA-x95h-979x-cf3j","title":"Policies not properly enforced in bluemonday","description":"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.","status":"published","published":"2021-10-19T20:15:30Z","modified":"2024-10-21T20:24:06.367686Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"4.0","score":8.1,"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","level":"high"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:59.835583Z"},{"id":"UBUNTU-CVE-2021-42576","description":"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.","status":"published","published":"2021-10-18T15:15:00Z","modified":"2025-10-24T04:50:36Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"GO-2022-0588","title":"Cross-site scripting via leaked style elements in github.com/microcosm-cc/bluemonday","description":"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.","status":"published","published":"2022-08-15T18:02:24Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:00.918515Z"},{"id":"PYSEC-2021-849","description":"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.","status":"published","published":"2021-10-18T15:15:00Z","modified":"2023-11-08T04:07:06.825297Z","updated_at":"2026-11-02T15:52:53.119977Z"}]}}
