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

XStream is vulnerable to an Arbitrary File Deletion on the local host when unmarshalling as long as the executing process has sufficient rights

CVE-2021-21343

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 where the processed stream at unmarshalling time contains type information to recreate the formerly written objects. XStream creates therefore new instances based on these type information. An attacker can manipulate the processed input stream and replace or inject objects, that result in the deletion of a file on the local host. 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 attackers to delete arbitrary files on the local host by manipulating the XML type information during unmarshalling.

CVE-2021-21343 is an arbitrary file deletion vulnerability in XStream versions prior to 1.4.16. The flaw lies in how XStream handles type information during unmarshalling of XML data. By injecting specially crafted type information, an attacker can cause XStream to instantiate objects that lead to file deletion [1][4].

The attack is performed remotely by providing a manipulated XML stream to an application that uses XStream to unmarshal data. The attacker does not require authentication if the application processes user-supplied XML. The default blacklist in XStream's security framework is insufficient; users who rely on the blacklist must upgrade to 1.4.16 [3]. The vendor recommends using a whitelist of allowed types [2].

Successful exploitation allows an attacker to delete arbitrary files on the local host, provided the XStream process has sufficient file system permissions. This can lead to denial of service or data loss. The vulnerability does not affect users who have configured XStream's security framework with a whitelist [4].

Users should upgrade to XStream 1.4.16 or later. If upgrade is not possible, the workaround is to apply a whitelist-based security framework [2]. The CVE is published and patched.

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.