VYPR
Moderate severityNVD Advisory· Published Mar 22, 2021· Updated Aug 3, 2024

XStream is vulnerable to an Arbitrary Code Execution attack

CVE-2021-21350

Description

XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability which may allow a remote attacker to execute arbitrary code 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. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.16.

AI Insight

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

XStream before 1.4.16 allows remote code execution via a manipulated input stream when using the default blacklist, not a whitelist.

Vulnerability

CVE-2021-21350 is an arbitrary code execution vulnerability in XStream, a Java library for XML serialization. The root cause is that XStream relies on type information in the processed input stream to recreate objects during unmarshalling. An attacker can replace or inject malicious objects into the XML stream, leading to the execution of arbitrary code. [1] [2] [4]

Exploitation

The attack is remote and requires no authentication; the attacker only needs to provide a specially crafted XML (or other supported format like JSON) to an application that unmarshals user-supplied data using XStream. The vulnerability affects all versions up to and including 1.4.15 when using the default security framework (which uses a blacklist). Users who follow XStream's recommendation to configure a whitelist of minimal required types are not affected. [2] [3] [4]

Impact

Successful exploitation allows an attacker to execute arbitrary code in the context of the server running XStream. This can lead to full compromise of the application, including data theft, file manipulation, or further lateral movement. [2] [3]

Mitigation

XStream 1.4.16 fixes the vulnerability. Users relying on the default blacklist must upgrade to at least this version. Alternatively, applications can be protected by configuring XStream's security framework with a strict whitelist. [1] [3]

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.161.4.16

Affected products

10

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

23

News mentions

0

No linked articles in our index yet.