TextParseUtil.translateVariablesdoes not filter malicious OGNL expressions
Who should read this
All Struts 2 developers
Impact of vulnerability
Remote Code Execution, when unsanitized user input is passed to the method by a developer
Maximum security rating
Don't pass unsanitized input to the said method or ActionSupport's getText methods. An upgrade to Struts 18.104.22.168 is recommended.
Struts 2.0.0 - Struts Struts 22.214.171.124
Huawei PSIRT Team
TextParseUtil.translateVariables evaluates a given String with OGNL. Before Struts 2.3.20, a specially crafted String incorporating ANTLR tooling can, when passed to said method, cause a remote code execution.
The Struts 2 framework does not pass any user modifiable input to this method, neither directly nor indirectly. However, a developer crafting a Struts based web application might pass unsanitized user input to TextParseUtil.translateVariables or ActionSupport's getText methods. In that case a RCE exploitation might be possible.
- don't pass unsanitized user input to framework methods that include OGNL expression evaluation
- upgrade to Struts 126.96.36.199. Since Struts 2.3.20 advanced filtering was applied to this and similar methods involving OGNL evaluation.