Appsecure logo

CVE-2022-25168: Critical Vulnerability in Apache Hadoop

A critical vulnerability in Apache Hadoop's FileUtil.unTar API could allow attackers to execute arbitrary commands. Organizations should prioritize patching to mitigate risks associated with this vulnerability.

CRITICALCVSS 9.8 · Published August 4, 2022

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2022-25168 is a critical vulnerability affecting Apache Hadoop's FileUtil.unTar(File, File) API. It allows attackers to inject arbitrary commands due to a lack of input file name escaping before passing it to the shell. The vulnerability has been classified with a CVSS score of 9.8, signifying its critical nature and the potential for significant impact on affected systems.

The vulnerability is primarily utilized in Hadoop 3.3's InMemoryAliasMap.completeBootstrapTransfer function, which is executed by a local user. However, it has also been present in previous versions of Hadoop (2.x) for yarn localization, enabling remote code execution. In addition, this vulnerability impacts Apache Spark through the SQL command ADD ARCHIVE, allowing the addition of new binaries to the classpath.

Organizations that use Apache Hadoop should be aware that the risk to organizations includes potential unauthorized command execution, which can lead to data breaches or system compromise. The urgency for defenders is high, as the exploitation of this vulnerability can have severe consequences.

Users are strongly encouraged to upgrade to Apache Hadoop versions 2.10.2, 3.2.4, or 3.3.3 and above, which include the necessary mitigation measures to prevent shell commands from being executed. Failure to patch could leave organizations exposed to significant risks.

The vulnerability was published on August 4, 2022, and its status has been modified since. Organizations must remain vigilant and implement updates to safeguard their infrastructure against this critical vulnerability.

Vulnerability Details

The official description states that Apache Hadoop's FileUtil.unTar(File, File) API does not escape the input file name before being passed to the shell. An attacker can inject arbitrary commands. This has been exploited in different contexts, including Hadoop 2.x and in Apache Spark.

This vulnerability is classified under CWE-78, which pertains to OS Command Injection. The CVSS score of 9.8 indicates a critical severity level, highlighting the potential risks associated with exploitation.

The affected versions include Apache Hadoop versions 2.0.0 to 2.10.1, 3.0.0 to 3.2.3, and 3.3.0 to 3.3.2, all of which are vulnerable to this command injection flaw.

Technical Analysis

The root cause of the vulnerability lies in the failure to escape file names passed to the shell, which allows for command injection. The attack vector is network-based, and the complexity of the attack is low, requiring no privileges or user interaction.

In terms of impacts, the confidentiality, integrity, and availability of the system are all rated high. Attackers may leverage this vulnerability to execute arbitrary commands, potentially leading to severe data loss or unauthorized access.

Risk & Impact Analysis

The real-world deployment risk associated with this vulnerability is substantial. Organizations using vulnerable versions of Apache Hadoop face the threat of remote code execution, which can severely compromise their sensitive data and operational integrity.

The urgency assessment is critical, considering the high CVSS score of 9.8. Organizations should prioritize patching immediately to mitigate potential exploitation risks. The blast radius of this vulnerability is extensive, as it can affect any system leveraging the affected versions of Apache Hadoop.

Exploitation Status

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

All versions prior to vendor patch are affected, specifically Apache Hadoop versions 2.0.0 to 2.10.1, 3.0.0 to 3.2.3, and 3.3.0 to 3.3.2.

Mitigation & Remediation

Organizations should upgrade to Apache Hadoop versions 2.10.2, 3.2.4, or 3.3.3 or upper to mitigate this vulnerability effectively.

In cases where immediate patching is not feasible, temporary workarounds include implementing input validation to escape file names before passing them to the shell.

Organizations may also consider configuration hardening and monitoring to detect any unauthorized access attempts.

For more guidance on continuous security testing, organizations should refer to continuous penetration testing services.

Detection Guidance

Organizations should monitor logs for unusual file access patterns, and review behavioral anomalies related to user actions that could indicate exploitation attempts.

Network signatures should also be configured to detect unauthorized command executions.

AppSecure Threat Intelligence Insight

This vulnerability highlights the importance of implementing strict input validation mechanisms to prevent command injection vulnerabilities.

Organizations should adopt a comprehensive vulnerability management program to identify and mitigate similar risks.

Following best practices in penetration testing and continuous security assessments can also help organizations stay ahead of potential vulnerabilities.

To further strengthen defenses, organizations should engage in red teaming exercises to simulate real-world attack scenarios.

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

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.