Denial of Service Vulnerability in libxstream-java: Stack Overflow via BinaryStreamDriver

libxstream-java Updated 02 Oct 2025

Summary

08/11/2024
N/A
Yes i
Unrated
Not published

CVE-2024-47072: XStream is a simple library to serialize objects to XML and back again. Affects libxstream-java across 2 version ranges.

< 1.4.15-3+deb11u3 < bb838ce2269cac47433e31c77b2b236466e9f266

Fixed in 1.4.15-3+deb11u3. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

XStream is a powerful library designed for serializing Java objects to XML and deserializing XML back into Java objects. It is widely used for its simplicity and flexibility in handling complex data structures. However, when configured to use the BinaryStreamDriver, it becomes susceptible to a specific vulnerability that can lead to application crashes.

Vulnerability Detail

The vulnerability identified as CVE-2024-47072 allows a remote attacker to exploit the BinaryStreamDriver configuration in XStream. By manipulating the input stream, an attacker can trigger a stack overflow error, resulting in a denial of service (DoS) condition. This issue arises from improper handling of binary input streams, which can lead to application instability and crashes. The vulnerability affects versions prior to 1.4.21, which has been patched to detect such manipulations and raise an InputManipulationException instead.

How To Fix

Minimum fixed version

1.4.15-3+deb11u3

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 upgrading is not immediately possible, users can implement a workaround by catching the StackOverflowError in the client code that calls XStream when configured with the BinaryStreamDriver. This can be done using a try-catch block as shown below:

try {

    // Code that uses XStream
} catch (StackOverflowError e) {
    // Handle the error gracefully
}

Conclusion

The CVE-2024-47072 vulnerability in the XStream library poses a significant risk of denial of service through stack overflow when using the BinaryStreamDriver. Users are strongly advised to upgrade to the patched version to mitigate this risk. For those unable to upgrade immediately, implementing a try-catch workaround can provide temporary relief.

See every vulnerability recorded for libxstream-java →

Share this vulnerability

FAQ

CVE-2024-47072 is a vulnerability in the XStream library that can lead to a denial of service due to stack overflow when using the BinaryStreamDriver.

An attacker can exploit this vulnerability to crash your application, leading to service interruptions and potential data loss.

All versions prior to 1.4.21 are affected by this vulnerability.

Yes, XStream version 1.4.21 and later includes a patch that addresses this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply using a manifest file like package-lock.json, you can check for vulnerabilities without needing to install anything.

Related vulnerabilities

Recent vulnerabilities recorded for libxstream-java.

How To Fix

Minimum fixed version

1.4.15-3+deb11u3

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