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

XStream is vulnerable to an Arbitrary Code Execution attack

CVE-2021-21347

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 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. 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 deserialization of untrusted XML input, enabling arbitrary code loading from a remote host.

CVE-2021-21347 is a deserialization vulnerability in XStream versions prior to 1.4.16. The library reconstructs Java objects based on type information embedded in XML input. An attacker can inject malicious type references into the stream, causing XStream to load and execute arbitrary code from a remote server [2][4].

To exploit this, a remote attacker sends a crafted XML payload to an application that unmarshals XStream data without proper safeguards. No authentication is required if the application processes untrusted input. The vulnerability affects the default blacklist-based security configuration; users who have implemented a whitelist of allowed types are not impacted [3][4].

Successful exploitation grants the attacker arbitrary code execution in the context of the XStream process, potentially leading to full server compromise. The CVSS score is 9.8, reflecting critical severity [3].

Mitigation requires upgrading to XStream 1.4.16 or later. Alternatively, users can configure the security framework with a strict whitelist of permitted classes as recommended by the vendor [2][4].

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.