Critical Vulnerability in libxstream-java: Potential Server-Side Forgery Request

libxstream-java Updated 02 Oct 2025

Summary

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

UBUNTU-CVE-2021-21342: 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 their deserialization back to Java objects. It is widely used for converting Java objects into XML format, making it easier to transmit data over networks or store it in files. However, this library has a significant vulnerability that can be exploited if not properly secured, particularly in versions prior to 1.4.16.

Vulnerability Detail

The vulnerability in libxstream-java arises during the unmarshalling process, where the input stream contains type information necessary for recreating previously serialized objects. An attacker can manipulate this input stream to inject or replace objects, leading to potential server-side forgery requests. This vulnerability is particularly concerning for applications that do not implement XStream's security framework with a strict whitelist of allowed types. If the default blacklist is relied upon, the application remains at risk until updated to version 1.4.16 or later.

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

As a temporary workaround, if updating the package is not immediately feasible, it is recommended to configure XStream's security framework to use a whitelist of allowed types, limiting the types that can be processed during unmarshalling. This can help mitigate the risk until an update can be applied.

Conclusion

The vulnerability in libxstream-java poses a significant risk to applications that utilize this library for XML serialization. It is crucial to update to a patched version or implement strict security measures to mitigate the risk of server-side forgery requests. Regular monitoring and vulnerability assessments are recommended to maintain application security.

See every vulnerability recorded for libxstream-java →

Share this vulnerability

FAQ

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

Versions of libxstream-java prior to 1.4.16 are affected by this vulnerability.

If left unaddressed, this vulnerability can allow attackers to perform server-side forgery requests, potentially compromising the integrity and security of your application.

Yes, you can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Vulert is a tool that monitors and alerts users in real-time for open-source vulnerabilities in software using just a manifest file like package-lock.json.

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