The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-29505

CVE-2021-29505: XStream Java Library RCE Vulnerability

CVE-2021-29505 is a remote code execution vulnerability in XStream that allows attackers to execute commands by manipulating input streams. This article covers technical details, affected versions, and mitigations.

Published: February 25, 2026

CVE-2021-29505 Overview

CVE-2021-29505 is a high-severity remote code execution vulnerability in XStream, a popular Java library for serializing objects to XML and back. The vulnerability allows a remote attacker with sufficient rights to execute arbitrary commands on the host system by manipulating the processed input stream during deserialization operations. This vulnerability is particularly dangerous because it affects XStream instances that have not properly configured the security framework with a whitelist of allowed types.

XStream is widely used in Java applications for XML serialization and is incorporated into numerous enterprise products from Oracle, NetApp, and other vendors, significantly expanding the attack surface for this vulnerability.

Critical Impact

Remote attackers can achieve arbitrary command execution on vulnerable systems by crafting malicious XML input, potentially leading to complete system compromise. The vulnerability has an extremely high EPSS probability of 90.769% (99th percentile), indicating significant real-world exploitation likelihood.

Affected Products

  • XStream versions prior to 1.4.17
  • Debian Linux 9.0, 10.0, and 11.0
  • Fedora 33, 34, and 35
  • NetApp SnapManager for Oracle and SAP
  • Oracle Banking Cash Management 14.2, 14.3, 14.5
  • Oracle Banking Corporate Lending Process Management 14.2.0, 14.3.0, 14.5.0
  • Oracle Banking Credit Facilities Process Management 14.2.0, 14.3.0, 14.5.0
  • Oracle Banking Supply Chain Finance 14.2.0
  • Oracle Banking Trade Finance Process Management 14.5.0
  • Oracle Business Activity Monitoring 11.1.1.9.0, 12.2.1.3.0, 12.2.1.4.0
  • Oracle Communications BRM - Elastic Charging Engine 11.3, 12.0
  • Oracle Communications Unified Inventory Management 7.3.4, 7.3.5, 7.4.0, 7.4.1, 7.4.2
  • Oracle Enterprise Manager Ops Center 12.4.0.0
  • Oracle Retail Customer Insights 15.0.2, 16.0.2
  • Oracle Retail XStore Point of Service 16.0.6, 17.0.4, 18.0.3, 19.0.2, 20.0.1
  • Oracle WebCenter Portal 12.2.1.3.0, 12.2.1.4.0
  • Oracle WebCenter Sites 12.2.1.3.0, 12.2.1.4.0

Discovery Timeline

  • 2021-05-28 - CVE-2021-29505 published to NVD
  • 2025-05-30 - Last updated in NVD database

Technical Details for CVE-2021-29505

Vulnerability Analysis

This vulnerability stems from improper handling of deserialization in XStream when the security framework is not properly initialized with a type whitelist. When XStream processes untrusted XML input without appropriate security constraints, it can instantiate arbitrary Java classes specified in the XML data. This allows attackers to leverage gadget chains present in the application's classpath to achieve remote code execution.

The core issue is that XStream, by default, does not restrict which Java types can be deserialized from XML input. When an attacker can control or influence the XML data being processed, they can craft payloads that, upon deserialization, trigger execution of arbitrary system commands. The vulnerability specifically involves types in the java.rmi.* and sun.rmi.* package hierarchies, as well as com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl.

Root Cause

The root cause is XStream's permissive default configuration that allows deserialization of arbitrary Java types without explicit authorization. When applications use XStream without configuring the security framework to whitelist only required types, they become vulnerable to deserialization attacks. The lack of input validation on the type information embedded in XML allows attackers to specify dangerous classes that can be weaponized during object reconstruction.

Attack Vector

The attack is network-based and requires low privileges to execute. An attacker must be able to submit malicious XML content to an application that uses a vulnerable XStream instance for deserialization. The attack flow involves:

  1. Identifying an endpoint that accepts XML input processed by XStream
  2. Crafting a malicious XML payload containing references to dangerous Java types
  3. Submitting the payload to trigger deserialization
  4. The XStream library instantiates the specified objects, executing attacker-controlled commands

The patch addresses this by blacklisting dangerous types by default. Below is the security patch that documents the CVE fix and the types that were blacklisted:

text
 	<h1 id="upcoming-1.4.x">Upcoming 1.4.x maintenance release</h1>
 
 	<p>Not yet released.</p>

+	<p class="highlight">This maintenance release addresses the security vulnerability
+	<a href="CVE-2020-26258.html">CVE-2021-29505</a>, when unmarshalling with XStream instances using an uninitialized
+	security framework.</p>
+
+	<h2>Stream compatibility</h2>
+
+	<ul>
+		<li>The following types are now blacklisted by default and the deserialization
+		of XML containing one of the two types will fail.  You will have to enable these types by explicit
+		configuration, if you need them:<br>
+			<ul>
+				<li>any type in the java.rmi.* and sun.rmi.* package hierarchies</li>
+				<li>the individual type com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl</li>
+			</ul>
+		</li>
+	</ul>
 
 	<h1 id="1.4.16">1.4.16</h1>

Source: XStream GitHub Commit 24fac82191292c6ae25f94508d28b9823f83624f

Detection Methods for CVE-2021-29505

Indicators of Compromise

  • Unusual XML payloads containing references to java.rmi.*, sun.rmi.*, or com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl classes in application logs
  • Unexpected process spawning from Java application processes, particularly shell invocations or network connections
  • Application errors or exceptions related to XStream deserialization failures after patching attempts
  • Unusual outbound network connections from servers running XStream-based applications

Detection Strategies

  • Implement application-level logging for all XStream deserialization operations and monitor for suspicious class instantiation attempts
  • Deploy web application firewall (WAF) rules to detect and block XML payloads containing known dangerous Java class references
  • Use static analysis tools to identify XStream usage in your codebase and verify security framework configuration
  • Monitor Java process behavior for signs of command injection, such as unexpected child processes or system calls

Monitoring Recommendations

  • Enable detailed logging on applications using XStream and forward logs to SIEM for correlation and alerting
  • Set up alerts for deserialization exceptions that may indicate attack attempts against patched systems
  • Monitor network traffic for suspicious outbound connections from Java applications that could indicate successful exploitation
  • Regularly scan your environment to identify applications using vulnerable XStream versions

How to Mitigate CVE-2021-29505

Immediate Actions Required

  • Upgrade XStream to version 1.4.17 or later immediately on all affected systems
  • If immediate upgrade is not possible, configure XStream's security framework with a strict whitelist limited to only the minimal required types
  • Audit all applications in your environment to identify those using XStream and prioritize remediation based on exposure
  • Review application logs for any evidence of exploitation attempts prior to patching

Patch Information

XStream version 1.4.17 addresses this vulnerability by blacklisting dangerous types by default. The patch prevents deserialization of types in the java.rmi.* and sun.rmi.* package hierarchies, as well as com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl. Users who require these types must explicitly enable them through configuration.

For the primary fix, see the XStream GitHub commit 24fac82191292c6ae25f94508d28b9823f83624f. Additional vendor patches are available from Oracle's January 2022 Security Advisory, Oracle's April 2022 Security Advisory, and the Debian Security Update DSA-5004.

For comprehensive vulnerability details and additional mitigation guidance, refer to the XStream CVE-2021-29505 Information page and the GitHub Security Advisory GHSA-7chv-rrw6-w6fc.

Workarounds

  • Configure XStream's security framework with a whitelist of only the types your application requires for serialization/deserialization
  • If using a version prior to 1.4.17, explicitly blacklist the java.rmi.*, sun.rmi.* packages and com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl class
  • Implement input validation at the application layer to reject XML containing references to suspicious Java classes
  • Consider network segmentation to limit exposure of applications using XStream to untrusted networks
java
// XStream Security Framework Configuration Example
XStream xstream = new XStream();
// Setup security framework with explicit type allowlist
xstream.addPermission(NoTypePermission.NONE);
xstream.addPermission(NullPermission.NULL);
xstream.addPermission(PrimitiveTypePermission.PRIMITIVES);
xstream.allowTypes(new Class[] {
    // Add only the specific types your application requires
    YourRequiredClass.class,
    AnotherAllowedClass.class
});

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechXstream

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability90.77%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94

  • CWE-502
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-7chv-rrw6-w6fc

  • Apache JMeter Dev Thread

  • Debian LTS Announcement July 2021

  • Fedora Package Announcement July 2021

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory NTAP-20210708-0007

  • Debian Security Update DSA-5004

  • Oracle Security Alert July 2022

  • Oracle Security Alert October 2021

  • X-Stream CVE-2021-29505 Information

  • Apache JMeter Dev Thread

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory NTAP-20210708-0007
  • Vendor Resources
  • GitHub Commit Update

  • Oracle Security Alert April 2022

  • Oracle Security Alert January 2022
  • Related CVEs
  • CVE-2021-21347: NetApp OnCommand Insight RCE Vulnerability

  • CVE-2020-26217: XStream RCE Vulnerability

  • CVE-2021-39139: XStream Library RCE Vulnerability

  • CVE-2021-39153: XStream Library RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English