{"id":"CVE-2020-6802","aliases":["CVE-2020-6802","GHSA-q65m-pv3f-wr5r","PYSEC-2020-27"],"related":[],"kind":"vulnerability","state":"published","title":"XSS in Bleach when noscript and raw tag whitelisted","summary":"In Mozilla Bleach before 3.11, a mutation XSS affects users calling bleach.clean with noscript and a raw tag in the allowed/whitelisted tags option.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Mozilla Bleach before 3.11, a mutation XSS affects users calling bleach.clean with noscript and a raw tag in the allowed/whitelisted tags option.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA [mutation XSS](https://cure53.de/fp170.pdf) affects users calling `bleach.clean` with `noscript` and a raw tag (see below) in the allowed/whitelisted tags option.\n\n### Patches\n\nv3.1.1\n\n### Workarounds\n\n* modify `bleach.clean` calls to not whitelist `noscript` and one or more of the following raw tags:\n\n```\ntitle\ntextarea\nscript\nstyle\nnoembed\nnoframes\niframe\nxmp\n```\n\n* A strong [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) without `unsafe-inline` and `unsafe-eval` [`script-src`s](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src)) will also help mitigate the risk.\n\n### References\n\n* https://bugzilla.mozilla.org/show_bug.cgi?id=1615315\n* https://cure53.de/fp170.pdf\n* https://nvd.nist.gov/vuln/detail/CVE-2020-6802\n* https://www.checkmarx.com/blog/vulnerabilities-discovered-in-mozilla-bleach\n\n### Credits\n\n* Reported by [Yaniv Nizry](https://twitter.com/ynizry) from the CxSCA AppSec group at Checkmarx\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue at [https://github.com/mozilla/bleach/issues](https://github.com/mozilla/bleach/issues)\n* Email us at [security@mozilla.org](mailto:security@mozilla.org)","format":"markdown","source":"ghsa"},{"lang":"es","text":"En Mozilla Bleach versiones anteriores a 3.11, una mutación de XSS afecta a usuarios que llaman a bleach.clean con noscript y una etiqueta sin procesar en la opción de etiquetas allowed/whitelisted.","source":"nvd"}],"published":"2020-02-24T17:33:44.000Z","modified":"2026-07-08T06:29:24.337Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<=3.10","status":"affected"}],"product":"Mozilla Bleach","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.1"}],"ecosystem":"PyPI","package":"bleach","purl":"pkg:pypi/bleach","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.1"}],"vendor":"mozilla","product":"bleach","cpe":"cpe:2.3:a:mozilla:bleach:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"30"},{"status":"affected","version":"31"},{"status":"affected","version":"32"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.1"}],"ecosystem":"PyPI","package":"bleach","purl":"pkg:pypi/bleach","source":"pysec"}],"references":[{"url":"https://github.com/mozilla/bleach/security/advisories/GHSA-q65m-pv3f-wr5r","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OCNLM2MGQTOLCIVVYS2Z5S7KOQJR5JC4/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/72R4VFFHDRSQMNT7IZU3X2755ZP4HGNI/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YTULPQB7HVPPYWEYVNHJGDTSPVIDHIZX/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.checkmarx.com/blog/vulnerabilities-discovered-in-mozilla-bleach","tags":["article","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://advisory.checkmarx.net/advisory/CX-2020-4276","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-6802","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mozilla/bleach/commit/f77e0f6392177a06e46a49abd61a4d9f035e57fd","tags":["web"],"sources":["ghsa"]},{"url":"https://bugzilla.mozilla.org/show_bug.cgi?id=1615315","tags":["web"],"sources":["ghsa"]},{"url":"https://cure53.de/fp170.pdf","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mozilla/bleach","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/bleach/PYSEC-2020-27.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/72R4VFFHDRSQMNT7IZU3X2755ZP4HGNI","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OCNLM2MGQTOLCIVVYS2Z5S7KOQJR5JC4","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YTULPQB7HVPPYWEYVNHJGDTSPVIDHIZX","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OCNLM2MGQTOLCIVVYS2Z5S7KOQJR5JC4/","tags":["web"],"sources":["pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/72R4VFFHDRSQMNT7IZU3X2755ZP4HGNI/","tags":["web"],"sources":["pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YTULPQB7HVPPYWEYVNHJGDTSPVIDHIZX/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"mozilla","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-6802","url":"https://www.cve.org/CVERecord?id=CVE-2020-6802","licence":"CVE Terms of Use","modified":"2024-08-04T09:11:05.145Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q65m-pv3f-wr5r","url":"https://github.com/advisories/GHSA-q65m-pv3f-wr5r","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:24.337Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-6802","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-6802","licence":"Public domain","modified":"2026-06-17T03:23:50.010Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-27","url":"https://osv.dev/vulnerability/PYSEC-2020-27","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:57.056Z"}],"updatedAt":"2026-11-25T22:57:51.648Z","epss":{"score":0.01731,"percentile":0.78291,"date":"2026-12-01T12:00:22.000Z"}}