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-2022-25168

CVE-2022-25168: Apache Hadoop RCE Vulnerability

CVE-2022-25168 is a remote code execution vulnerability in Apache Hadoop's FileUtil.unTar API that allows command injection. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 17, 2026

CVE-2022-25168 Overview

CVE-2022-25168 is a critical command injection vulnerability in Apache Hadoop's FileUtil.unTar(File, File) API. The vulnerability exists because the API does not properly escape input file names before passing them to the shell, allowing attackers to inject and execute arbitrary commands. This flaw affects multiple components across the Apache Hadoop ecosystem, including YARN localization in Hadoop 2.x which enables remote code execution, and the InMemoryAliasMap.completeBootstrapTransfer function in Hadoop 3.3. Additionally, Apache Spark is affected through its SQL ADD ARCHIVE command.

Critical Impact

This command injection vulnerability enables remote code execution through unescaped shell commands, potentially allowing complete system compromise in affected Apache Hadoop and Spark deployments.

Affected Products

  • Apache Hadoop versions prior to 2.10.2
  • Apache Hadoop versions prior to 3.2.4
  • Apache Hadoop versions prior to 3.3.3

Discovery Timeline

  • August 4, 2022 - CVE-2022-25168 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2022-25168

Vulnerability Analysis

This vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command), commonly known as OS Command Injection. The root issue lies in the FileUtil.unTar() method which processes tar archive files without properly sanitizing the input file names before executing shell commands.

When processing archive files, the vulnerable function constructs shell commands by directly concatenating user-controlled file names. An attacker can craft malicious file names containing shell metacharacters (such as semicolons, backticks, or pipe characters) to break out of the intended command context and execute arbitrary commands with the privileges of the Hadoop process.

The attack surface varies depending on the deployment context. In Hadoop 2.x, the YARN localization process uses this vulnerable function to handle container resources, enabling remote attackers to achieve code execution by submitting malicious job resources. In Hadoop 3.3, the InMemoryAliasMap.completeBootstrapTransfer function is only executed by local users, limiting the attack surface. Apache Spark's ADD ARCHIVE SQL command also utilizes this function, though exploitation through this vector is constrained since the command already allows adding binaries to the classpath.

Root Cause

The root cause is insufficient input validation and improper neutralization of special characters in file names before shell command execution. The FileUtil.unTar() method directly passes file name parameters to shell commands without escaping shell metacharacters, violating secure coding practices for handling external input in command construction.

Attack Vector

The attack is network-accessible with low complexity, requiring no privileges or user interaction. An attacker can exploit this vulnerability by:

  1. Crafting a malicious tar archive with specially crafted file names containing shell command injection payloads
  2. Submitting the malicious archive to a vulnerable Hadoop cluster (e.g., through YARN job submission in Hadoop 2.x)
  3. When the archive is processed by FileUtil.unTar(), the injected commands execute with the privileges of the Hadoop service account

The vulnerability allows injection through file names containing shell metacharacters. For example, a file named test;whoami;.tar would cause the whoami command to execute when the archive is processed. More sophisticated payloads could establish reverse shells or download and execute additional malware.

Detection Methods for CVE-2022-25168

Indicators of Compromise

  • Unexpected shell processes spawned by Java processes running Hadoop or Spark services
  • Unusual network connections originating from Hadoop NodeManager or YARN container processes
  • Archive files with suspicious names containing shell metacharacters (;, |, `, $()) in YARN localization directories
  • Anomalous command execution patterns in system audit logs correlating with YARN job submissions

Detection Strategies

  • Monitor process execution chains for shell commands spawned as children of Java processes in Hadoop deployments
  • Implement file integrity monitoring on Hadoop configuration and binary directories
  • Deploy YARA rules to detect malicious archive files with command injection patterns in file names
  • Enable audit logging for YARN ResourceManager and NodeManager to track job submissions and resource localization events

Monitoring Recommendations

  • Configure centralized logging for all Hadoop cluster nodes with real-time alerting on suspicious command patterns
  • Implement network segmentation monitoring to detect unexpected outbound connections from Hadoop worker nodes
  • Enable Java security manager logging to capture unauthorized shell execution attempts
  • Deploy endpoint detection and response (EDR) solutions like SentinelOne on all Hadoop cluster nodes for behavioral analysis

How to Mitigate CVE-2022-25168

Immediate Actions Required

  • Upgrade Apache Hadoop to version 2.10.2, 3.2.4, 3.3.3, or later which include the fix in HADOOP-18136
  • For Apache Spark deployments, upgrade to version 3.1.4, 3.2.2, or 3.3.0 which include SPARK-38305
  • Audit existing YARN jobs and archives for potentially malicious file names
  • Restrict network access to YARN ResourceManager and NodeManager ports using firewall rules

Patch Information

Apache has released security patches addressing this vulnerability. Users should upgrade to the following fixed versions:

  • Apache Hadoop: Version 2.10.2, 3.2.4, 3.3.3, or higher (includes HADOOP-18136)
  • Apache Spark: Version 3.1.4, 3.2.2, 3.3.0, or higher (includes SPARK-38305 - "Check existence of file before untarring/zipping")

For detailed information, refer to the Apache Mailing List Thread and the NetApp Security Advisory NTAP-20220915-0007.

Workarounds

  • Implement strict input validation on all file names processed by Hadoop services at the application level
  • Deploy application-level firewalls or API gateways to filter requests containing shell metacharacters in file names
  • Restrict YARN job submission privileges to trusted users only through Hadoop ACLs and Kerberos authentication
  • Consider running Hadoop services in containerized environments with restricted system call capabilities using seccomp profiles
bash
# Verify Apache Hadoop version to confirm patched status
hadoop version

# Check for vulnerable versions and upgrade if necessary
# For Hadoop 2.x, upgrade to at least 2.10.2
# For Hadoop 3.2.x, upgrade to at least 3.2.4
# For Hadoop 3.3.x, upgrade to at least 3.3.3

# Restrict YARN ResourceManager access via iptables
iptables -A INPUT -p tcp --dport 8088 -s <trusted_network> -j ACCEPT
iptables -A INPUT -p tcp --dport 8088 -j DROP

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechApache Hadoop

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-78
  • Technical References
  • NetApp Security Advisory NTAP-20220915-0007
  • Vendor Resources
  • Apache Mailing List Thread
  • Related CVEs
  • CVE-2025-27821: Apache Hadoop Buffer Overflow Vulnerability

  • CVE-2024-23454: Apache Hadoop Information Disclosure Flaw

  • CVE-2023-26031: Apache Hadoop Privilege Escalation Flaw

  • CVE-2021-37404: Apache Hadoop Buffer Overflow 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