CVE-2017-9805: Apache Struts REST Plugin XStreamHandler Deserialization Remote Code Execution

Summary

16/10/2018
Yes i
High
8.1

CVE-2017-9805: The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code... Affects org.apache.struts:struts2-rest-plugin across 2 version ranges.

>= 2.1.1, < 2.3.34 >= 2.5.0, < 2.5.13

Fixed in 2.3.34 or 2.5.13, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Apache Struts REST Plugin is a component of the Apache Struts framework that allows developers to build RESTful web services. It uses XStream, a Java library for serializing and deserializing objects to and from XML, for deserialization. This vulnerability affects versions 2.1.2 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 of the Apache Struts REST Plugin. The plugin uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code Execution when deserializing XML payloads.

Vulnerability Detail

The vulnerability in the Apache Struts REST Plugin arises from the lack of type filtering during deserialization of XML payloads. This allows an attacker to craft a malicious XML payload that, when deserialized by the plugin, can execute arbitrary code on the server. This can lead to a complete compromise of the affected system, enabling unauthorized access, data theft, or further attacks. The vulnerability has a CVSSv3 score of 8.1, indicating a high severity level.

How To Fix

Latest published version: 7.4.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.1.1, < 2.3.34 2.3.34
  • >= 2.5.0, < 2.5.13 2.5.13

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to a fixed version is not immediately feasible, a temporary workaround is to disable or block access to the affected REST endpoints. This can be achieved by modifying the application's configuration or using network-level controls. However, this workaround should only be considered as a temporary measure until the upgrade can be performed.

Conclusion

The Apache Struts REST Plugin is vulnerable to a remote code execution vulnerability due to the lack of type filtering during deserialization. Upgrading to a fixed version of the plugin is the recommended solution. If immediate upgrade is not possible, disabling or blocking access to the affected REST endpoints can serve as a temporary workaround. It is crucial to take prompt action to mitigate the risk of exploitation. For further assistance and support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.struts:struts2-rest-plugin →

Share this vulnerability

FAQ

This vulnerability allows an attacker to execute arbitrary code on the server, potentially leading to a complete compromise of the affected system.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it in real-time.

Yes, there have been known exploits targeting this vulnerability. It is crucial to patch or upgrade the affected Apache Struts REST Plugin to mitigate the risk.

While there have been reports of active attacks exploiting this vulnerability in the past, it is always recommended to assume that the vulnerability is actively targeted until the affected systems are patched or upgraded.

In addition to upgrading or patching the Apache Struts REST Plugin, it is recommended to follow secure coding practices, implement proper input validation, and regularly update all software components to minimize the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.struts:struts2-rest-plugin.

How To Fix

Latest published version: 7.4.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.1.1, < 2.3.34 2.3.34
  • >= 2.5.0, < 2.5.13 2.5.13

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback