Miggo Logo

CVE-2020-15171: Users with SCRIPT right can execute arbitrary code in XWiki

6.6

CVSS Score
3.1

Basic Information

EPSS Score
0.71846%
Published
9/10/2020
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.xwiki.platform:xwiki-platform-oldcoremaven< 11.10.511.10.5
org.xwiki.platform:xwiki-platform-oldcoremaven>= 12.0.0, < 12.2.112.2.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from exposing the ServletContext to users with SCRIPT rights via the $request binding. The XWikiServletRequestStub class likely provides access to the ServletContext through getServletContext(), which would be dangerous if accessible in scripts. The XWikiScriptContextManager's role in binding the request object to the scripting context makes it a key enabler of this exposure. These functions together allow attackers to reach Java reflection capabilities through the ServletContext, aligning with the described injection and code execution vectors (CWE-74/CWE-94).

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t *ny us*r wit* S*RIPT ri**t (**IT ri**t ***or* XWiki *.*) **n **in ****ss to t** *ppli**tion s*rv*r S*rvl*t *ont*xt w*i** *ont*ins tools *llowin* to inst*nti*t* *r*itr*ry J*v* o*j**ts *n* invok* m*t*o*s t**t m*y l*** to *r*itr*ry *o** *x**

Reasoning

T** vuln*r**ility st*ms *rom *xposin* t** `S*rvl*t*ont*xt` to us*rs wit* S*RIPT ri**ts vi* t** `$r*qu*st` *in*in*. T** `XWikiS*rvl*tR*qu*stStu*` *l*ss lik*ly provi**s ****ss to t** `S*rvl*t*ont*xt` t*rou** `**tS*rvl*t*ont*xt()`, w*i** woul* ** **n**r