Vulnerability record · CVE-2021-21346 · published 23 March 2021
CVE-2021-21346: XStream deserialization allows remote code execution
NNetapp · Oncommand Insight
XStream before 1.4.16 deserializes untrusted XML without adequate type restrictions, letting a remote attacker load and execute arbitrary code by manipulating the processed input stream. It matters because XStream is embedded in many Java applications and middleware, and the default blacklist-based security framework does not block this attack.
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityCVSS 9.8 with network reachability, no authentication or interaction, and public exploit material, though it is not in KEV.
What it is
XStream before 1.4.16 deserializes untrusted XML without adequate type restrictions, letting a remote attacker load and execute arbitrary code by manipulating the processed input stream. It matters because XStream is embedded in many Java applications and middleware, and the default blacklist-based security framework does not block this attack.
Impact
An attacker gains remote code execution in the context of the application processing the XML, which typically means full compromise of that process and its data. No confidentiality, integrity or availability impact is excluded by the CVSS vector.
Attack surface
Reached over the network by submitting crafted XML to any endpoint or message channel that feeds XStream, per the CVSS vector AV:N/AC:L/PR:N/UI:N. No authentication and no user interaction are required.
Exploitation
Not listed in CISA KEV and no ransomware usage is documented, but EPSS is 0.76367 (99.5th percentile) and the vendor reference is tagged Exploit, indicating public exploit material exists.
What to do
- Upgrade XStream to 1.4.16 or later, or apply the vendor patch for the affected product (Oracle, NetApp, Debian, Fedora advisories exist).
- Replace the default blacklist with a whitelist limited to the minimal required types, as the advisory recommends.
- Where XStream cannot be patched, isolate or disable XML deserialization of untrusted input and validate input against a strict schema.
- Inventory applications and middleware that bundle XStream (ActiveMQ, JMeter, Oracle and NetApp products) and track their patched versions.
Detection
- Search application and server logs for XStream deserialization errors or unexpected class-loading exceptions tied to XML input.
- Monitor for outbound network connections or process spawns originating from Java services that handle XML, which can indicate post-exploitation code loading.
- Scan deployed artifacts for XStream versions below 1.4.16 and flag any use of the default blacklist configuration.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
16 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2021-21346 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-21346), CISA KEV, FIRST EPSS (scores of 2026-09-25). This page is refreshed as NVD updates the record.