CVE-2021-21350: 
Java vulnerability analysis and mitigation

Overview

CVE-2021-21350 affects XStream versions before 1.4.16. XStream is a Java library to serialize objects to XML and back again. The vulnerability allows a remote attacker to execute arbitrary code 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 (GitHub Advisory, XStream Changes).

Technical details

The vulnerability exists because XStream creates new instances based on type information contained in the processed stream at unmarshalling time. An attacker can manipulate the input stream and replace or inject objects that result in arbitrary code execution. The vulnerability has a CVSS v3.1 Base Score of 9.8 (CRITICAL) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

A successful exploitation of this vulnerability could allow remote attackers to execute arbitrary code on the affected system by manipulating the processed input stream. This could lead to complete system compromise, including unauthorized access to sensitive data, system modifications, or service disruption (XStream CVE).

Exploitability

The vulnerability is remotely exploitable without requiring authentication. An attacker only needs the ability to send malicious XML data to be processed by XStream. A proof-of-concept exploit exists that demonstrates code execution by injecting malicious payloads through XML deserialization (XStream CVE).

Mitigation and workarounds

The primary mitigation is to upgrade to XStream version 1.4.16 or later. For users who cannot upgrade, XStream provides a security framework to implement a whitelist for allowed types. Users should configure the security framework to explicitly define which types are allowed during deserialization. The recommended approach is to use a whitelist rather than a blacklist to minimize security risks (XStream Security).

Community reactions

Multiple organizations and vendors issued security advisories and patches in response to this vulnerability, including Oracle, Red Hat, Debian, and NetApp. The vulnerability was widely acknowledged as critical due to its potential for remote code execution (NetApp Advisory, Debian Advisory).

Additional resources


Source: This report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-107726CRITICAL9.3
  • Java logoJava
  • apache-nifi
NoYesOct 08, 2026
CVE-2026-107725HIGH8.7
  • Java logoJava
  • maven:3.9::maven-resolver.src
NoYesOct 08, 2026
CVE-2026-107226MEDIUM6.8
  • Java logoJava
  • druid
NoYesOct 08, 2026
CVE-2026-107314MEDIUM5.9
  • Java logoJava
  • libpgjava
NoYesOct 07, 2026
CVE-2026-107315MEDIUM5.3
  • Java logoJava
  • libpgjava
NoYesOct 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management