Critical Vulnerability in libxstream-java: Remote Command Execution Risk

libxstream-java Updated 02 Oct 2025

Summary

23/03/2021
N/A
Yes i
Critical
9.9

UBUNTU-CVE-2021-21345: 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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 object persistence and data interchange. The library's functionality is crucial for developers who need to convert Java objects into XML format for storage or transmission. However, it has been found to have a significant security vulnerability that can be exploited if not properly managed.

Vulnerability Detail

XStream before version 1.4.16 contains a vulnerability that allows a remote attacker with sufficient rights to execute arbitrary commands on the host by manipulating the processed input stream. This vulnerability arises from the library's default security settings, which may not adequately protect against malicious input. If users do not implement XStream's security framework with a strict whitelist of required types, they are at risk of exploitation. The CVSS score for this vulnerability is 9.9, indicating a critical level of severity.

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 feasible, consider implementing XStream's security framework with a whitelist of minimal required types to mitigate the risk of exploitation. This involves configuring the library to only allow specific classes to be deserialized, thus reducing the attack surface.

Conclusion

The libxstream-java library has a critical vulnerability that can lead to remote command execution if not properly managed. It is essential for users to update to the latest patched versions or implement strict security configurations to mitigate risks. Regular monitoring and vulnerability assessments are recommended to ensure application security.

See every vulnerability recorded for libxstream-java →

Share this vulnerability

FAQ

The vulnerability allows remote command execution by manipulating the input stream if the security framework is not properly configured.

You can use Vulert's playground at Vulert Scanner to check if your application is affected without requiring any signup.

Failure to address this vulnerability could lead to unauthorized command execution on your server, potentially compromising sensitive data and system integrity.

Yes, versions 1.4.16 and above are considered safe as they contain fixes for this vulnerability.

The CVSS score of this vulnerability is 9.9, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for libxstream-java.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback