Miggo Logo

CVE-2016-6795: Path Traversal in Apache Struts

9.8

CVSS Score
3.0

Basic Information

EPSS Score
0.93592%
Published
5/14/2022
Updated
1/4/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.struts:struts2-convention-pluginmaven>= 2.3.0, < 2.3.312.3.31
org.apache.struts:struts2-convention-pluginmaven>= 2.5.0, < 2.5.52.5.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insufficient path validation in the ConventionUnknownHandler's resource lookup logic. The original code in findResult() checked only if a resource exists (via servletContext.getResource() and ClassLoaderUtil.getResource()), but did not verify if the resolved resource's actual path matched the requested path. This allowed crafted URLs with '../' sequences to access arbitrary resources. The patch introduced an additional check (resource.getPath().endsWith(path)), which directly addresses this flaw. The function's role in mapping URLs to resources and the specific nature of the vulnerability (path traversal via Convention plugin) make this the clear entry point for exploitation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In *p**** Struts *.*.x ***or* *.*.**, *n* *.*.x ***or* *.*.*, it is possi*l* to pr*p*r* * sp**i*l URL w*i** will ** us** *or p*t* tr*v*rs*l *n* *x**ution o* *r*itr*ry *o** on s*rv*r si**. T*is vuln*r**ility is only *xploit**l* w**n usin* t** Struts *

Reasoning

T** vuln*r**ility st*ms *rom insu**i*i*nt p*t* v*li**tion in t** *onv*ntionUnknown**n*l*r's r*sour** lookup lo*i*. T** ori*in*l *o** in `*in*R*sult()` ****k** only i* * r*sour** *xists (vi* `s*rvl*t*ont*xt.**tR*sour**()` *n* `*l*ssLo***rUtil.**tR*sou