Lucene search

K
githubGitHub Advisory DatabaseGHSA-M6XF-FQ7Q-8743
HistoryMar 24, 2020 - 3:06 p.m.

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

2020-03-2415:06:32
CWE-79
GitHub Advisory Database
github.com
57

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.002 Low

EPSS

Percentile

59.1%

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:

Affected configurations

Vulners
Node
mozillableachRange<3.1.2
CPENameOperatorVersion
bleachlt3.1.2

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.002 Low

EPSS

Percentile

59.1%