# CVE-2013-7285: Command Injection in Xstream

> Remote attackers can execute arbitrary shell commands via manipulated input streams in XStream if the security framework is not initialized.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2019
- **Updated:** 8 Oct 2026
- **Also known as:** DEBIAN-CVE-2013-7285, GHSA-f554-x222-wgf7, MGASA-2014-0100, RHSA-2014:0389, UBUNTU-CVE-2013-7285

## What is CVE-2013-7285?

CVE-2013-7285 is a critical command injection vulnerability in Apache Activemq, published on 15 May 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Xstream API versions up to 1.4.6 and version 1.4.10, if the security framework has not been initialized, may allow a remote attacker to run arbitrary shell commands by manipulating the processed input stream when unmarshaling XML or any supported format. e.g. JSON.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2013-7285?

4 open source packages ship an affected version, including com.thoughtworks.xstream:xstream. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.thoughtworks.xstream:xstream` | Maven | All versions | 1.4.7 |
| `com.thoughtworks.xstream:xstream` | Maven | All versions | 1.4.7 |
| `com.thoughtworks.xstream:xstream` | Maven | From 1.4.10 | 1.4.11 |
| `com.thoughtworks.xstream:xstream` | Maven | From 1.4.10 | 1.4.11 |
| `jasperreports-server-pro` | Red Hat:rhev_manager:3 | All versions | 0:5.5.0-6.el6ev |

Products: Apache Activemq, Oracle Endeca Information Discovery Studio, Xstream Xstream.

## How do I fix CVE-2013-7285?

Upgrade com.thoughtworks.xstream:xstream to a fixed version for your release line: 1.4.7 or 1.4.11.

## Is CVE-2013-7285 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2013-7285 exists.

Public exploit code:

- OpenMRS Reporting Module 0.9.7 - Remote Code Execution (exploitdb)
- https://github.com/shoucheng3/x-stream__xstream_CVE-2013-7285_1-4-6 (github_poc): https://github.com/shoucheng3/x-stream__xstream_CVE-2013-7285_1-4-6
- XStream <1.4.6/1.4.10 - Remote Code Execution (nuclei): http/cves/2013/CVE-2013-7285.yaml

## Other vulnerabilities in Apache Activemq

- [CVE-2023-46604](https://insights.sbomify.com/CVE-2023-46604/): Apache ActiveMQ Deserialization of Untrusted Data (critical 10.0, exploited in the wild)
- [CVE-2016-3088](https://insights.sbomify.com/CVE-2016-3088/): Apache ActiveMQ Improper Input Validation (critical 9.8, exploited in the wild)
- [CVE-2026-34197](https://insights.sbomify.com/CVE-2026-34197/): Apache ActiveMQ Improper Input Validation (high 8.8, exploited in the wild)
- [CVE-2020-11998](https://insights.sbomify.com/CVE-2020-11998/): Remote code execution in Apache ActiveMQ (critical 9.8)
- [CVE-2014-3600](https://insights.sbomify.com/CVE-2014-3600/): Improper Restriction of XML External Entity Reference in Apache ActiveMQ (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2013-7285 and fix it if it is affected.

What it is: CVE-2013-7285 is a critical command injection vulnerability in Apache Activemq, published on 15 May 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2013-7285 exists.

Affected packages and fixed versions:
- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.7
- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.7
- com.thoughtworks.xstream:xstream (Maven): affected from 1.4.10; fixed in 1.4.11
- com.thoughtworks.xstream:xstream (Maven): affected from 1.4.10; fixed in 1.4.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2013-7285/ (Markdown: https://insights.sbomify.com/CVE-2013-7285/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2013-7285
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2013-7285
- OSV: https://osv.dev/vulnerability/CVE-2013-7285

---
From sbomify Insights: https://insights.sbomify.com/CVE-2013-7285/
Summaries are generated and may contain mistakes; the official description above is the record.
