SonicWall Security Center
Share: Linkedin Share Facebook Like
Back to SonicALERT


Apache Struts 2 CVE-2017-9805 Remote Code Execution (Sep 7 2017)



Description


A critical vulnerability CVE-2017-9805 (S2-052) on Apache Struts 2 has been reported by security researchers form lgtm.com. This vulnerability is caused by the XStreamHandler in by the REST Plugin. During the process of deserializing the XML formatted packet, XStream failed to filter the file types. An attacker can send a certain crafted XML file to the target server and execute arbitrary code with the privelege of the current service.

The PoC of this vulnerability is already in the wild. By sending the following payload as application/xml, the calc.exe will be executed on the target host.

<map> <entry> <jdk.nashorn.internal.objects.NativeString> <flags>0</flags> <value class="com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data"> ...[truncated].../Applications/Calculator.app/Contents/MacOS/Calculator...[truncated]... </value> </jdk.nashorn.internal.objects.NativeString> <jdk.nashorn.internal.objects.NativeString reference="../jdk.nashorn.internal.objects.NativeString"/> </entry> <entry> <jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/> <jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/> </entry> </map>

In this PoC, the "map" class contributed the dangerous methods.

From the patch code on Github (http://bit.ly/2eRD33v), white lists have been applied to the xml data, this is to prevent malicious class and methods been brought in during the processing.

And the filter was added before calling the XStream.fromXML method.

SonicWALL customers are protected against this threat via the following signature:

  • IPS 12968 Apache Struts 2 Insecure Deserialization



Back to top

Back to SonicALERT

Follow: Follow us on Facebook Follow us on Twitter Join the Conversation
#SonicWall
© 2017 SonicWall | Privacy Policy | Conditions for use | Feedback | Live Demo | SonicALERT | Document Library | Report Issues
Version: 13.7 | S2MSW01