Critical Remote Code Execution Vulnerability in libxstream-java
Summary
UBUNTU-CVE-2021-21347: XStream is a Java library to serialize objects to XML and back again. Affects libxstream-java versions < 1.4.7-1ubuntu0.1+esm2. Fixed in 1.4.7-1ubuntu0.1+esm2. 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 designed to serialize objects to XML and deserialize XML back into objects. It is widely used in applications that require object-to-XML mapping. The library provides a flexible framework for XML serialization but has a known vulnerability that can be exploited if not properly configured, particularly in its security framework.
Vulnerability Detail
XStream before version 1.4.16 contains a vulnerability that allows remote attackers to load and execute arbitrary code from a remote host by manipulating the processed input stream. This vulnerability arises from the library's default security settings, which may not adequately restrict the types of objects that can be deserialized. If users rely on the default blacklist of the Security Framework, they are at risk of exploitation. The CVSS score for this vulnerability is 9.8, indicating a critical severity level.
How To Fix
Minimum fixed version
1.4.7-1ubuntu0.1+esm2
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
If immediate patching is not possible, consider implementing a security framework with a whitelist that limits the types of objects that can be deserialized. This can be done by configuring XStream's security settings to only allow safe types.
Conclusion
The libxstream-java library has a critical vulnerability that can lead to remote code execution if not addressed. Users are strongly advised to update to the latest patched version and consider implementing security best practices to mitigate risks. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.
See every vulnerability recorded for libxstream-java →
FAQ
The vulnerability allows remote attackers to execute arbitrary code, potentially leading to complete system compromise.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground.
Versions prior to 1.4.16 are affected by this vulnerability.
No subscription is required for the patched versions available for Ubuntu 18.04 and 20.04.
Implement a security framework with a whitelist to limit deserialization to safe types until you can apply the patch.
Related vulnerabilities
Recent vulnerabilities recorded for libxstream-java.