SecPod

Learn Search

Search across all Learn content

← Back to Security Research
APACHE STRUTS2 Remote Code Execution (CVE-2017-9805)

APACHE STRUTS2 Remote Code Execution (CVE-2017-9805)

Sep 10, 2017By Shakeel Bhat3 min read

A critical remote code execution vulnerability recently discovered in the popular Apache Struts web application framework allows a remote attacker to execute arbitrary code on any server running an application built using the affected Struts framework and the popular REST communication plugin. This flaw (CVE 2017-9805) is due to an unsafe deserialization (Deserialization is the process of taking structured data from one format and rebuilding it into an object) in Java and assigned CVE 2017-9805. A good Vulnerability management tool can solve these issues.

This vulnerability poses a huge risk as the Struts framework is typically in use for designing publicly-accessible web applications. Struts are in many airline booking systems and a number of financial institutions that use them in Internet banking applications. However, according to the Semmle researcher Bas van Schaik, this vulnerability affects Organizations like Lockheed Martin, the IRS, Citigroup, Vodafone, Virgin Atlantic, Reader’s Digest, Office Depot, and Showtime. Vulnerability Management System can prevent these attacks. Another analyst Fintan Ryan at RedMonk estimates that at least 65% of the Fortune 100 companies are actively using web applications built with the Struts framework.

This remote code execution is possible when using the Struts REST plugin with the XStream handler to facilitate XML payloads. XStream is a Java library in use to serialize objects to XML (or JSON) and back again. In addition to it, the vulnerability is easy to exploit. An attacker must send a malicious XML code in a particular format to trigger the vulnerability on the targeted server. Successfully exploiting this vulnerability will allow an attacker to control the affected server fully. This illustrates how critical the risk is. It is to note that the exploit for this vulnerability is publicly available, and one such working exploit is available here for anyone to use. This vulnerability will be exploited wildly in a matter of time.

Technical Details:

Apache Struts 2 REST plugin (CVE-2017-9805) utilizes the JAVA XStream XML serialization library for deserializing the users input. A JAVA deserialization error occurs when Apache Struts 2 REST plugin attempts to deserialize a specially crafted XML sent by the attacker which may consequently lead to remote code execution. There are ways through which user-controlled data flows to a deserialization method. As an example, Apache Struts uses the ContentTypeHandler interface. This converts data into Java objects. Since implementations of this interface usually deserialize the data passed to them, every class that implements this interface is potentially at risk. A code sample used by lgtm to identify the flaw is listed here:

The typical PoC for CVE-2017-9805 is present below:

Affected versions by CVE 2017-9805:

All versions of Apache Struts since 2008 (Struts 2.1.2 – Struts 2.3.33, Struts 2.5 – Struts 2.5.12) are affected. All the web applications using the framework’s REST plugin are vulnerable.

Workaround for CVE 2017-9805:

Any of the following workarounds can be in use:
1) Remove the Struts REST plugin when not used.
2) Upgrade the Struts REST plugin by dropping in all the required JARs (plugin plus all dependencies).
3) Limit the plugin to server normal pages and JSONs only.

Solution:

An advisory giving solution details is available here. However, This vulnerability is in Struts versions 2.3.34 and 2.5.13

Featured Posts

Open GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation
GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

CVE Research

GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

The GT13 campaign targeted at least 22 organizations worldwide by exploiting vulnerabilities in exposed services and Check Point Security Management Servers. The attackers used forged authentication sessions, SSH-based persistence, internal reconnaissance, lateral movement, and data exfiltration techniques to compromise systems and access sensitive information.

Nov 26, 2026

Open GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution
vulnerability researchGeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

CVE Research

GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

Six vulnerabilities in GeoServer’s November 2026 security update can expose sensitive files, bypass service authorization, and enable administrator impersonation. Several of these flaws can be chained for unauthenticated remote code execution with the permissions of the GeoServer process. CVE-2026-120705 and CVE-2026-129243 have been reported as exploited. Fixed releases include GeoServer 3.0.2, 2.28.6, and 2.27.7. This article covers the flaws, the public five-CVE chain, impact, affected versions, and remediation guidance.

Nov 26, 2026

Open Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026
Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

CVE Research

Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

Critical security flaws disclosed in November 2026 affect Microsoft Office, Erlang/OTP, and Mozilla Thunderbird. Explore CVE-2026-112732, CVE-2026-124286, and CVE-2026-136226, including remote code execution, TLS server impersonation, email spoofing risks, affected versions, and fixes.

Nov 25, 2026

Open Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws
vulnerability researchCritical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

CVE Research

Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

Nov 24, 2026