Vulnerability record · CVE-2021-21343 · published 23 March 2021
CVE-2021-21343: XStream XML deserialization allows arbitrary file deletion
NNetapp · Oncommand Insight
XStream before 1.4.16 unmarshals attacker-controlled XML that carries type information, letting the attacker replace or inject objects during deserialization. The injected object graph can delete a file on the local host. Systems relying on XStream's default blacklist rather than a minimal whitelist are exposed.
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Automated analysis
high priorityNetwork-reachable, no authentication or interaction required, high EPSS, and public exploit detail, though impact is limited to file deletion and KEV listing is absent.
What it is
XStream before 1.4.16 unmarshals attacker-controlled XML that carries type information, letting the attacker replace or inject objects during deserialization. The injected object graph can delete a file on the local host. Systems relying on XStream's default blacklist rather than a minimal whitelist are exposed.
Impact
An attacker can cause deletion of an arbitrary file on the host running the vulnerable XStream instance, which can disrupt or break the affected application or service. The CVSS vector shows high integrity impact with no confidentiality or availability scoring, though file deletion can indirectly affect availability.
Attack surface
Reached by supplying a crafted XML stream to an application that unmarshals untrusted data with XStream. The CVSS vector (AV:N/AC:L/PR:N/UI:N) indicates network reachability with no authentication and no user interaction required.
Exploitation
Not listed in CISA KEV and no ransomware usage is documented. EPSS is high (0.46666, 98.8th percentile) and the vendor advisory reference is tagged Exploit, indicating public exploit detail exists.
What to do
- Upgrade XStream to 1.4.16 or later, which fixes the default blacklist behavior.
- Replace reliance on the default blacklist with a whitelist limited to the minimal required types.
- Apply vendor patches for products bundling XStream (Apache ActiveMQ, JMeter, NetApp, Oracle, Debian, Fedora) as listed in their advisories.
- Do not unmarshal XML from untrusted or unauthenticated sources; restrict network exposure of endpoints that deserialize XML.
- Review the XStream security framework workaround guidance referenced in the vendor advisory.
Detection
- Monitor application logs for XStream unmarshalling errors or unexpected class instantiation during XML processing.
- Alert on file deletion events (especially unexpected or sensitive paths) on hosts running XStream-based services.
- Inspect inbound XML payloads for type information and class names not expected by the application.
- Track XStream library versions in deployed applications and flag instances below 1.4.16.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
15 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2021-21343 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-21343), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.