|Home > Security Bulletins > S2-013|
A vulnerability, present in the includeParams attribute of the URL and Anchor Tag, allows remote command execution
Who should read this
All Struts 2 developers
Impact of vulnerability
Remote command execution
Maximum security rating
Developers should immediately upgrade to Struts 18.104.22.168
Struts 2.0.0 - Struts 2.3.14
The Struts Team
The main scope of that attribute is to understand whether includes http request parameter or not.
The allowed values of includeParams are:
A request that included a specially crafted request parameter could be used to inject arbitrary OGNL code into the stack, afterward used as request parameter of an URL or A tag , which will cause a further evaluation.
The second evaluation happens when the URL/A tag tries to resolve every parameters present in the original request.
This lets malicious users put arbitrary OGNL statements into any request parameter (not necessarily managed by the code) and have it evaluated as an OGNL expression to enable method execution and execute arbitrary methods, bypassing Struts and OGNL library protections.
As you will notice, in this case, there is no way to escape/sanitize the fakeParam, since it's not an expected parameter.
The OGNLUtil class was changed to deny eval expressions by default.