Critical Command Execution Vulnerability in libxstream-java
Summary
DEBIAN-CVE-2021-39144: XStream is a simple library to serialize objects to XML and back again. Affects libxstream-java versions < 1.4.15-3+deb11u1. Fixed in 1.4.15-3+deb11u1. 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 of objects to XML and vice versa. It is widely used in applications that require data interchange in XML format. The library's functionality allows developers to easily convert Java objects into XML representations, making it a popular choice for various Java-based applications. However, certain versions of libxstream-java are vulnerable to a command execution flaw that can be exploited if proper security measures are not implemented.
Vulnerability Detail
The vulnerability identified as DEBIAN-CVE-2021-39144 allows a remote attacker with sufficient rights to execute arbitrary commands on the host system by manipulating the input stream processed by the XStream library. This issue arises from the library's handling of untrusted input, which can lead to unauthorized command execution if the security framework is not properly configured. Users who do not implement a whitelist of allowed types are particularly at risk, as the default settings prior to version 1.4.18 relied on a blacklist that could not be adequately secured for general use.
How To Fix
Minimum fixed version
1.4.15-3+deb11u1
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
As a temporary workaround, users are advised to configure XStream's security framework to utilize a whitelist of allowed types, limiting the types that can be deserialized. This can be done by implementing a security configuration that specifies only the necessary classes for deserialization, thus mitigating the risk of command execution.
Conclusion
The vulnerability in libxstream-java poses a significant risk of command execution if not addressed. Users are strongly encouraged to update to the latest patched versions and implement security best practices to safeguard their applications. Utilizing tools like Vulert can further enhance security by providing real-time monitoring for vulnerabilities.
See every vulnerability recorded for libxstream-java →
FAQ
The vulnerability allows remote attackers to execute arbitrary commands on the host system by manipulating the input stream processed by the library.
Affected versions include those prior to 1.4.15-3+deb11u1 for Debian 11 and prior to 1.4.18-1 for Debian 12, 13, and 14.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
Ensure that you update libxstream-java to the latest patched version and configure the security framework to use a whitelist of allowed types.
Vulert monitors and alerts in real-time for open-source vulnerabilities using just a manifest file like package-lock.json, helping developers maintain secure applications.
References
Related vulnerabilities
Recent vulnerabilities recorded for libxstream-java.