Remote Code Execution Vulnerability in libxstream-java: CVE-2020-26217
Summary
CVE-2020-26217: XStream before version 1.4.14 is vulnerable to Remote Code Execution.The vulnerability may allow a remote attacker to run arbitrary shell commands only by manipulating the processed input stream. Affects libxstream-java across 3 version ranges.
< 0fec095d534126931c99fd38e9c6d41f5c685c1a
< 1.4.14-1
< a0d4141a00ba5de4afaee160836898b41eb28065
Fixed in 1.4.14-1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
libxstream-java is a Java library that facilitates the serialization and deserialization of Java objects to XML and vice versa. It is widely used in various applications for data interchange. However, prior to version 1.4.14, it is susceptible to a critical vulnerability that allows remote code execution through manipulated input streams.
Vulnerability Detail
CVE-2020-26217 is a vulnerability in XStream versions before 1.4.14 that allows remote attackers to execute arbitrary shell commands by manipulating the input stream processed by the library. This vulnerability primarily affects users who rely on blocklists for security, as those using the Security Framework allowlist are not impacted. The vulnerability has a CVSS score of 8.8, indicating a high severity level, and poses significant risks to applications that utilize this library without proper security measures.
How To Fix
Minimum fixed version
1.4.14-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libxstream-java
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
For users unable to upgrade immediately, it is recommended to implement code workarounds as suggested in the linked advisory. One such workaround is to use XStream's Security Framework allowlist to restrict the types of objects that can be deserialized, thereby mitigating the risk of remote code execution. Example code snippet for using allowlist:
XStream xstream = new XStream();
// Allow only specific classes to be deserialized
xstream.allowTypes(new Class[] { YourAllowedClass.class });
Conclusion
CVE-2020-26217 is a critical vulnerability in the libxstream-java library that allows remote code execution through manipulated input streams. Users are strongly advised to upgrade to version 1.4.14 or later to mitigate this risk. For those unable to upgrade, implementing security workarounds is essential to protect applications from potential exploitation.
See every vulnerability recorded for libxstream-java →
FAQ
CVE-2020-26217 is a vulnerability in the XStream library that allows remote code execution through manipulated input streams.
Versions of libxstream-java prior to 1.4.14 are vulnerable to this issue.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you cannot upgrade, implement the suggested workarounds by using XStream's Security Framework allowlist to limit deserialization to specific classes.
The CVSS score of CVE-2020-26217 is 8.8, indicating a high severity level.
Related vulnerabilities
Recent vulnerabilities recorded for libxstream-java.