| Package | Affected versions | Patched versions |
|---|---|---|
| bleach | < 3.3.0 | 3.3.0 |
| bleach | < 3.3.0 | 3.3.0 |
A mutation XSS affects users calling bleach.clean with all of:
svg or math in the allowed tagsp or br in allowed tagsstyle, title, noscript, script, textarea, noframes, iframe, or xmp in allowed tagsstrip_comments=FalseNote: none of the above tags are in the default allowed tags and strip_comments defaults to True.
Users are encouraged to upgrade to bleach v3.3.0 or greater.
Note: bleach v3.3.0 introduces a breaking change to escape HTML comments by default.
modify bleach.clean calls to at least one of:
style, title, noscript, script, textarea, noframes, iframe, or xmp tagsvg or math tagsp or br tagsstrip_comments=TrueA strong Content-Security-Policy without unsafe-inline and unsafe-eval script-srcs) will also help mitigate the risk.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site freeIf you have any questions or comments about this advisory: