CVE-2013-1965: Code Injection
Apache Struts Showcase App 2.0.0 through 2.3.13, as used in Struts 2 before 2.3.14.3, allows remote attackers to execute arbitrary OGNL code via a crafted parameter name that is not properly handled when invoking a redirect.
Other sources
As per the upstream report:
OGNL provides, among other features, extensive expression evaluation capabilities. A request that included a specially crafted request parameter could be used to inject arbitrary OGNL code into a property, afterward used as request parameter of a redirect address, which will cause a further evaluation.
OGNL evaluation was already addressed in S2-003 and S2-005 and S2-009, but, since it involved just the parameter's name, it turned out that the resulting fixes based on whitelisting acceptable parameter names and denying evaluation of the expression contained in parameter names, closed the vulnerability only partially.
The second evaluation happens when redirect result reads it from the stack and uses the previously injected code as redirect parameter. This lets malicious users put arbitrary OGNL statements into any unsanitized String variable exposed by an action and have it evaluated as an OGNL expression to enable method execution and execute arbitrary methods, bypassing Struts and OGNL library protections.
This flaw is reported to affect Struts 2.0.0 through to Struts 2.3.14. It is corrected in 2.3.14.1.
External References:
https://cwiki.apache.org/confluence/display/WW/S2-012
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2013-1965?
CVE-2013-1965 is considered critical due to its potential to allow remote code execution via arbitrary OGNL code.
How do I fix CVE-2013-1965?
To fix CVE-2013-1965, upgrade to Apache Struts version 2.3.14.3 or later.
What software is affected by CVE-2013-1965?
CVE-2013-1965 affects Apache Struts versions 2.0.0 through 2.3.13.
Can CVE-2013-1965 be exploited remotely?
Yes, CVE-2013-1965 can be exploited by remote attackers due to improper handling of crafted parameter names.
What component of Apache Struts is implicated in CVE-2013-1965?
CVE-2013-1965 is related to the Struts 2 framework's handling of OGNL expressions during redirects.