Vulnerability ID: CVE-2017-9791
Vulnerability author: icez ic3z#qq.com
Affected version: Struts 2.3. x
Vulnerability rating: high risk
Vulnerability Brief Description: When the Struts 2 in Struts 1 Plug-in is enabled, an attacker through the use of malicious field values may cause the RCE. These untrusted input data is brought into the ActionMessage class in the error message.
Temporary solution:
Developers through the use of resource keys replace the original message is passed directly to the ActionMessage in the way. As shown below
messages. add(“msg”, new ActionMessage(“struts1. gangsterAdded”, gform. getName()));
Must not be used in the following manner
messages. add(“msg”, new ActionMessage(“Gangster” + gform. getName() + “was added”));
Verification screenshot
! [](/Article/UploadPic/2017-7/201778111753855. png? www. myhack58. com)
Reference links
https://cwiki.apache.org/confluence/display/WW/S2-048