# CVE-2020-26259: XStream is vulnerable to an Arbitrary File Deletion on the local host when unmarshalling

> Remote attackers can delete arbitrary files on the host via crafted XML input when using XStream's default blacklist configuration.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Dec 2020
- **Updated:** 7 Oct 2026
- **Also known as:** DEBIAN-CVE-2020-26259, GHSA-jfvx-7wrx-43fh, UBUNTU-CVE-2020-26259

## What is CVE-2020-26259?

CVE-2020-26259 is a medium-severity unsafe deserialization vulnerability in Apache Struts, published on 16 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.15, is vulnerable to an Arbitrary File Deletion on the local host when unmarshalling. The vulnerability may allow a remote attacker to delete arbitrary know files on the host as log as the executing process has sufficient rights only by manipulating the processed input stream. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.15. The reported vulnerability does not exist running Java 15 or higher. No user is affected, who followed the recommendation to setup XStream's Security Framework with a whitelist! Anyone relying on XStream's default blacklist can immediately switch to a whilelist for the allowed types to avoid the vulnerability. Users of XStream 1.4.14 or below who still want to use XStream default blacklist can use a workaround described in more detailed in the referenced advisories.

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

## Which versions are affected by CVE-2020-26259?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.thoughtworks.xstream:xstream` | Maven | All versions | 1.4.15 |
| `com.thoughtworks.xstream:xstream` | Maven | All versions | 1.4.15 |

Products: Apache Struts, Debian Debian Linux, Fedoraproject Fedora, Xstream Xstream.

## How do I fix CVE-2020-26259?

Upgrade com.thoughtworks.xstream:xstream to 1.4.15 or later.

## Is CVE-2020-26259 being exploited?

There is no known exploitation of CVE-2020-26259 in the wild and no public exploit code.

Public exploit code:

- CVE-2020-26259: XStream is vulnerable to an Arbitrary File Deletion on the local host when unmarshalling as long as the executing process has sufficient rights. (github_poc): https://github.com/jas502n/CVE-2020-26259
- CVE-2020-26259 &&XStream Arbitrary File Delete (github_poc): https://github.com/Al1ex/CVE-2020-26259
- https://github.com/cuijiung/xstream-CVE-2020-26259 (github_poc): https://github.com/cuijiung/xstream-CVE-2020-26259

## Other vulnerabilities in Apache Struts

- [CVE-2020-17530](https://insights.sbomify.com/CVE-2020-17530/): Apache Struts Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2017-9791](https://insights.sbomify.com/CVE-2017-9791/): Apache Struts 1 Improper Input Validation (critical 9.8, exploited in the wild)
- [CVE-2017-5638](https://insights.sbomify.com/CVE-2017-5638/): Apache Struts Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2012-0391](https://insights.sbomify.com/CVE-2012-0391/): Apache Struts 2 Improper Input Validation (critical 9.8, exploited in the wild)
- [CVE-2018-11776](https://insights.sbomify.com/CVE-2018-11776/): Apache Struts Remote Code Execution (high 8.1, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-26259 and fix it if it is affected.

What it is: CVE-2020-26259 is a medium-severity unsafe deserialization vulnerability in Apache Struts, published on 16 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-26259 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.15
- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.15

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-2020-26259/ (Markdown: https://insights.sbomify.com/CVE-2020-26259/index.md)
```

## Sources

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

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