Critical Remote Code Execution Vulnerability in libxstream-java
Summary
DEBIAN-CVE-2021-39147: 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 includes converting Java objects into XML and parsing XML back into Java objects, making it a valuable tool for developers. However, certain versions of libxstream-java are vulnerable to a security flaw that could allow remote attackers to execute arbitrary code.
Vulnerability Detail
The vulnerability identified as CVE-2021-39147 affects libxstream-java versions prior to 1.4.15-3+deb11u1 for Debian 11 and prior to 1.4.18-1 for Debian 12, 13, and 14. This flaw allows a remote attacker to manipulate the input stream processed by the library, potentially leading to the execution of arbitrary code from a remote host. The issue arises from the library's handling of untrusted input, which can be exploited if the security framework is not properly configured. Users who have not implemented a security whitelist are particularly at risk.
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 use a whitelist of allowed types, limiting the types that can be deserialized. This can be done by implementing a security manager and specifying the allowed classes, thus mitigating the risk of remote code execution.
Conclusion
The CVE-2021-39147 vulnerability in libxstream-java poses a significant risk of remote code execution if not addressed. Users are strongly advised to update to the latest patched versions of the library and implement security best practices to safeguard their applications.
See every vulnerability recorded for libxstream-java →
FAQ
CVE-2021-39147 is a vulnerability in libxstream-java that allows remote code execution through manipulated input streams.
Affected versions include libxstream-java 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 the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If immediate updates are not possible, configure the security framework of XStream to use a whitelist of allowed types to mitigate risks.
Failure to address this vulnerability could lead to unauthorized remote code execution, potentially compromising the security of your application and data.
References
Related vulnerabilities
Recent vulnerabilities recorded for libxstream-java.