Loading...
Skip to main content

CVE-2022-25168 — Vulnerability in org.apache.hadoop:hadoop-common...

CRITICAL

Apache Hadoop argument injection vulnerability

Published August 5, 2022Updated February 21, 2024Source: osv

Summary

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 is only used in Hadoop 3.3 InMemoryAliasMap.completeBootstrapTransfer, which is only ever run by a local user. It has been used in Hadoop 2.x for yarn localization, which does enable remote code execution. It is used in Apache Spark, from the SQL command ADD ARCHIVE. As the ADD ARCHIVE command adds new binaries to the classpath, being able to execute shell scripts does not confer new permissions to the caller. SPARK-38305. "Check existence of file before untarring/zipping", which is included in 3.3.0, 3.1.4, 3.2.2, prevents shell commands being executed, regardless of which version of the hadoop libraries are in use. Users should upgrade to Apache Hadoop 2.10.2, 3.2.4, 3.3.3 or upper (including HADOOP-18136).

Advisory Timeline

  • First published August 5, 2022 (1530 days ago).
  • Last revised February 21, 2024 — 565 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update org.apache.hadoop:hadoop-common to 3.2.4 or later
<!-- Update pom.xml dependency version to 3.2.4 for org.apache.hadoop:hadoop-common -->
Maven
Update org.apache.hadoop:hadoop-common to 3.3.3 or later
<!-- Update pom.xml dependency version to 3.3.3 for org.apache.hadoop:hadoop-common -->
Maven
Update org.apache.hadoop:hadoop-common to 2.10.2 or later
<!-- Update pom.xml dependency version to 2.10.2 for org.apache.hadoop:hadoop-common -->

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: maven (1).

PackageEcosystemAffectedFixed In
org.apache.hadoop:hadoop-common
maven
3.0.0, 3.0.0-alpha1, 3.0.0-alpha2, 3.0.0-alpha3 (+14 more)3.2.4
org.apache.hadoop:hadoop-common
maven
3.3.0, 3.3.1, 3.3.23.3.3
org.apache.hadoop:hadoop-common
maven
2.0.1-alpha, 2.0.2-alpha, 2.0.3-alpha, 2.0.4-alpha (+36 more)2.10.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2022-25168?
Apache Hadoop argument injection vulnerability This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2022-25168?
CVE-2022-25168 affects org.apache.hadoop:hadoop-common. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-25168 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8wm5-8h9c-47pc

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies