Critical Remote Code Execution Vulnerability in libxstream-java

libxstream-java Updated 02 Oct 2025

Summary

23/08/2021
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2021-39141: 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 ↓

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 that facilitates the serialization of objects to XML and vice versa. It is widely used in various applications for data interchange. The library is designed to be flexible and easy to use, but its functionality can also expose applications to security risks if not properly configured. This vulnerability allows attackers to exploit the library's serialization capabilities to execute arbitrary code remotely.

Vulnerability Detail

The vulnerability identified as DEBIAN-CVE-2021-39141 allows a remote attacker to load and execute arbitrary code from a remote host by manipulating the processed input stream. This issue arises from the library's handling of untrusted input, which can lead to unauthorized code execution if the security framework is not configured correctly. Users who do not implement a security whitelist are at risk, as the library defaults to a less secure configuration.

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 can configure XStream's security framework to use a whitelist of allowed types, limiting the types that can be deserialized. This can help mitigate the risk until the package is updated. Example configuration:

XStream xstream = new XStream();

// Allow only specific classes
xstream.allowTypes(new Class[]{AllowedClass1.class, AllowedClass2.class});

Conclusion

The 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 and configure the security framework appropriately to mitigate potential threats. Regular monitoring and vulnerability management practices are essential to maintain application security.

See every vulnerability recorded for libxstream-java →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to execute arbitrary code, potentially compromising the entire system.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Affected versions include all versions prior to the patched versions: 1.4.15-3+deb11u1 for Debian 11 and 1.4.18-1 for Debian 12, 13, and 14.

Yes, configuring XStream's security framework to use a whitelist of allowed types can help mitigate the risk.

If immediate updating is not possible, ensure that you implement strict input validation and use the security framework's whitelist feature.

Related vulnerabilities

Recent vulnerabilities recorded for libxstream-java.

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 →

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