Miggo Logo

CVE-2020-6816: Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.5788%
Published
3/24/2020
Updated
9/12/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
bleachpip< 3.1.23.1.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability documentation explicitly references bleach.clean as the entry point with specific parameter combinations (whitelisted tags + strip=False). The core issue stems from how Bleach's sanitizer processes content in SVG/math XML namespaces when RCDATA tags are allowed, failing to account for browser parsing differences. The function's handling of these edge cases in the HTML sanitization process is directly addressed in the v3.1.2 patch.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t * [mut*tion XSS](*ttps://*ur***.**/*p***.p**) *****ts us*rs **llin* `*l****.*l**n` wit* *ll o*: * t** `sv*` or `m*t*` in t** *llow**/w*it*list** t**s * *n R***T* t** (s** **low) in t** *llow**/w*it*list** t**s * t** k*ywor* *r*um*nt `str

Reasoning

T** vuln*r**ility *o*um*nt*tion *xpli*itly r***r*n**s `*l****.*l**n` *s t** *ntry point wit* sp**i*i* p*r*m*t*r *om*in*tions (w*it*list** t**s + strip=**ls*). T** *or* issu* st*ms *rom *ow *l****'s s*nitiz*r pro**ss*s *ont*nt in SV*/m*t* XML n*m*sp**