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

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


A critical vulnerability CVE-2017-9805 (S2-052) on Apache Struts 2 has been reported by security researchers form 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/[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 (, 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
© 2018 SonicWall | Privacy Policy | Conditions for use | Feedback | Live Demo | SonicALERT | Document Library | Report Issues
Version: 13.20 | S2MSW05