VYPR
High severityNVD Advisory· Published Aug 23, 2021· Updated Aug 4, 2024

XStream is vulnerable to an Arbitrary Code Execution attack

CVE-2021-39141

Description

XStream is a simple library to serialize objects to XML and back again. In affected versions this vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

XStream ≤1.4.17 allows remote code execution via manipulated XML input; upgrade to 1.4.18 or use whitelist.

Vulnerability

XStream versions up to and including 1.4.17 are vulnerable to arbitrary code execution via insecure deserialization. The vulnerability occurs during unmarshalling when the input stream contains type information that XStream uses to create new instances. An attacker can manipulate the input to inject objects that lead to execution of arbitrary code loaded from a remote host [1][2]. Users who have configured a whitelist of minimal required types are not affected.

Exploitation

An attacker can craft a malicious XML payload, such as a PriorityQueue containing a dynamic proxy, and have it unmarshalled by XStream. The attack requires no authentication, only the ability to supply the malicious input to an application using XStream [2].

Impact

Successful exploitation enables remote code execution in the context of the application using XStream, potentially leading to full system compromise [1].

Mitigation

Upgrade to XStream 1.4.18, which disables the default blacklist and instead recommends using a whitelist of allowed types. Users who cannot upgrade should configure XStream's security framework with a whitelist limited to the minimal required types [1][2].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
com.thoughtworks.xstream:xstreamMaven
< 1.4.181.4.18

Affected products

6

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

17

News mentions

0

No linked articles in our index yet.