[go: nahoru, domu]

Skip to content

mutation XSS via whitelisted math or svg and raw tag in Bleach

Moderate severity GitHub Reviewed Published Mar 17, 2020 in mozilla/bleach • Updated Jan 28, 2023

Package

pip bleach (pip)

Affected versions

< 3.1.2

Patched versions

3.1.2

Description

Impact

A mutation XSS affects users calling bleach.clean with all of:

  • the svg or math in the allowed/whitelisted tags
  • an RCDATA tag (see below) in the allowed/whitelisted tags
  • the keyword argument strip=False

Patches

Users are encouraged to upgrade to bleach v3.1.2 or greater.

Workarounds

  • modify bleach.clean calls to use strip=True, or not whitelist math or svg tags and one or more of the following tags:
script
noscript
style
noframes
xmp
noembed
iframe

References

Credits

  • Reported by Yaniv Nizry from the CxSCA AppSec group at Checkmarx

For more information

If you have any questions or comments about this advisory:

References

@g-k g-k published to mozilla/bleach Mar 17, 2020
Reviewed Mar 23, 2020
Published to the GitHub Advisory Database Mar 24, 2020
Published by the National Vulnerability Database Mar 24, 2020
Last updated Jan 28, 2023

Severity

Moderate
6.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weaknesses

CVE ID

CVE-2020-6816

GHSA ID

GHSA-m6xf-fq7q-8743

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.