Regular expression in ParametersInterceptor matches top‘foo’ as a valid expression, which OGNL treats as (top[‘foo’])(0) and evaluates the value of ‘foo’ action parameter as an OGNL expression. This lets malicious users put arbitrary OGNL statements into any String variable exposed by an action and have it evaluated as an OGNL expression and since OGNL statement is in HTTP parameter value attacker can use blacklisted characters (e.g. #) to disable method execution and execute arbitrary methods, bypassing the ParametersInterceptor and OGNL library protections.
References
- https://nvd.nist.gov/vuln/detail/CVE-2011-3923
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2011-3923
- https://exchange.xforce.ibmcloud.com/vulnerabilities/72585
- https://security-tracker.debian.org/tracker/CVE-2011-3923
- http://seclists.org/fulldisclosure/2014/Jul/38
- http://struts.apache.org/development/2.x/docs/s2-009.html
- https://github.com/advisories/GHSA-j68f-8h6p-9h5q