Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-39139

CVE-2021-39139: XStream Library RCE Vulnerability

CVE-2021-39139 is a remote code execution flaw in XStream library that allows attackers to load and execute arbitrary code from remote hosts. This post explains its impact, affected versions, and mitigation steps.

Published: February 25, 2026

CVE-2021-39139 Overview

CVE-2021-39139 is an insecure deserialization vulnerability in XStream, a popular Java library used to serialize objects to XML and back again. This vulnerability allows a remote attacker to load and execute arbitrary code from a remote host by manipulating the processed input stream. The attack is particularly effective against systems using XStream with JDK 1.7u21 or below out of the box, though the attack scenario can be adapted to work with external Xalan implementations regardless of Java runtime version.

Critical Impact

Remote attackers can achieve arbitrary code execution on vulnerable systems by crafting malicious XML input, potentially leading to complete system compromise.

Affected Products

  • XStream XStream (versions prior to 1.4.18)
  • Debian Linux 9.0, 10.0, and 11.0
  • Fedora 33, 34, and 35
  • NetApp SnapManager for Oracle and SAP
  • Oracle Business Activity Monitoring 12.2.1.4.0
  • Oracle Commerce Guided Search 11.3.2
  • Oracle Communications Billing and Revenue Management Elastic Charging Engine 11.3 and 12.0
  • Oracle Communications Cloud Native Core products
  • Oracle Communications Unified Inventory Management 7.3.x and 7.4.x
  • Oracle Retail XStore Point of Service 16.0.6 through 20.0.1
  • Oracle Utilities Framework 4.2.x through 4.4.x
  • Oracle WebCenter Portal 12.2.1.3.0 and 12.2.1.4.0

Discovery Timeline

  • August 23, 2021 - CVE-2021-39139 published to NVD
  • May 23, 2025 - Last updated in NVD database

Technical Details for CVE-2021-39139

Vulnerability Analysis

This vulnerability stems from XStream's handling of XML deserialization, which can be exploited to achieve arbitrary code execution. When XStream deserializes untrusted XML input without proper security controls, an attacker can craft malicious XML payloads that, when processed, trigger the loading and execution of arbitrary code from a remote location.

The vulnerability is classified under CWE-434, which relates to unrestricted file upload or, in this context, the unrestricted processing of malicious serialized data. The attack requires network access and low privileges to execute, but does not require user interaction, making it suitable for automated exploitation scenarios.

Users running XStream's default configuration with older JDK versions (1.7u21 or below) are immediately vulnerable. However, the attack can be modified to leverage external Xalan XSLT processors, extending the vulnerability's reach to systems running newer Java versions as well.

Root Cause

The root cause of this vulnerability lies in XStream's default blacklist-based security approach prior to version 1.4.18. Blacklist-based security is inherently flawed as it attempts to block known malicious patterns rather than explicitly allowing safe ones. Attackers discovered new deserialization gadget chains that bypassed the existing blacklists, enabling arbitrary code execution.

XStream 1.4.18 addresses this fundamental design flaw by switching from a blacklist to a whitelist approach, where only explicitly allowed types can be deserialized. This change prevents the exploitation of unknown gadget chains that could bypass blacklist filters.

Attack Vector

The attack is executed over the network by sending specially crafted XML data to an application that processes it using a vulnerable XStream instance. The attacker constructs an XML payload containing serialized object references that, when deserialized by XStream, trigger a chain of method invocations leading to arbitrary code execution.

The attack leverages Java's reflection capabilities and specific class arrangements (gadget chains) to achieve code execution. In the default configuration with JDK 1.7u21 or below, the JDK's own classes provide sufficient gadgets. For newer JDK versions, the attacker can construct payloads that utilize external libraries like Xalan to achieve the same result.

Detection Methods for CVE-2021-39139

Indicators of Compromise

  • Unusual network connections originating from Java processes to external hosts
  • Unexpected XML processing activity or errors in application logs
  • Evidence of code execution or process spawning from Java applications processing XML input
  • Suspicious serialized object patterns in XML payloads containing unusual class references

Detection Strategies

  • Monitor application logs for XStream deserialization errors or warnings about blocked types
  • Implement network egress monitoring to detect outbound connections from applications processing XStream data
  • Deploy runtime application self-protection (RASP) solutions to detect deserialization attacks
  • Use static analysis tools to identify applications using vulnerable XStream versions

Monitoring Recommendations

  • Enable verbose logging for XStream security framework events
  • Monitor Java process behavior for unusual child process creation or network activity
  • Implement alerting on detection of known XStream gadget chain class names in incoming traffic
  • Review application dependencies regularly for vulnerable XStream versions using software composition analysis tools

How to Mitigate CVE-2021-39139

Immediate Actions Required

  • Upgrade XStream to version 1.4.18 or later immediately
  • Implement XStream's security framework with a whitelist limited to the minimal required types
  • Review all applications using XStream and prioritize patching based on exposure to untrusted input
  • Consider implementing input validation to reject unexpected XML structures before XStream processing

Patch Information

XStream 1.4.18 fundamentally addresses this vulnerability by switching from a blacklist-based security model to a whitelist approach. This version no longer relies on blocking known malicious types but instead requires explicit configuration of allowed types for deserialization. Organizations should upgrade to version 1.4.18 or later and configure the security framework appropriately.

For Oracle products, consult the Oracle CPU January 2022, Oracle CPU April 2022, and Oracle CPU July 2022 advisories for product-specific patch information. Debian users should apply updates per DSA-5004.

Workarounds

  • Configure XStream's security framework with a strict whitelist of allowed types before deserializing untrusted data
  • Isolate applications processing untrusted XML input in network segments with restricted egress
  • Implement network-level controls to block outbound connections from application servers to untrusted hosts
  • Consider using alternative serialization libraries if XStream cannot be promptly updated
bash
# Example: Verify XStream version in Maven projects
mvn dependency:tree | grep xstream

# Check for vulnerable versions and update pom.xml to:
# <dependency>
#     <groupId>com.thoughtworks.xstream</groupId>
#     <artifactId>xstream</artifactId>
#     <version>1.4.18</version>
# </dependency>

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 Probability0.87%

  • 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-434
  • Technical References
  • GitHub Security Advisory

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory

  • Debian Security Advisory
  • Vendor Resources
  • Oracle CPU April 2022

  • Oracle CPU January 2022

  • Oracle CPU July 2022

  • XStream CVE Analysis
  • Related CVEs
  • CVE-2021-29505: XStream Java Library RCE Vulnerability

  • CVE-2021-21347: NetApp OnCommand Insight RCE Vulnerability

  • CVE-2020-26217: XStream 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