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.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
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
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 | Affected | Fixed in |
|---|---|---|
com.thoughtworks.xstream:xstream Maven | All versions | 1.4.15 |
com.thoughtworks.xstream:xstream Maven | All versions | 1.4.15 |
Products include 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.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
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: 3 proofs of concept on GitHub.
Other vulnerabilities in Apache Struts
Sources
Also known as DEBIAN-CVE-2020-26259, GHSA-jfvx-7wrx-43fh, UBUNTU-CVE-2020-26259.