Critical Remote Code Execution Vulnerability in libxstream-java

libxstream-java Updated 02 Oct 2025

Summary

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

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 ↓

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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

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