CVE-2022-25168: apache software foundation apache hadoop OS Command Injection
Vulnerability summary
CVE-2022-25168 is a critical (CVSS 9.8) OS Command Injection vulnerability in apache software foundation apache hadoop. EPSS estimates a 4.46% chance of exploitation in the next 30 days, higher than 91.3% of scored vulnerabilities.
Timeline
- 04-08-2022PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
Description
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).
CVSS metrics
3 scores · 3 sources · 1 version- OSV · ChainguardEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · MavenEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
4.46%
Chance of exploitation in the next 30 days
Percentile
91%
Versus all other CVEs
30-day change
+0.28 pp
From 4.18% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Apache1 product
- hadoop≥ 2.0.0, ≤ 2.10.1 | ≥ 3.0.0, ≤ 3.2.3 | ≥ 3.3.0, ≤ 3.3.2
Apache software foundation1 product
- apache hadoop2.0.0 to 2.10.1 | 3.0.0-alpha to 3.2.3 | 3.3.0 to 3.3.2
Chainguard1 product
- hadoop-fips-3.3.6All versions (No fix recorded)
Org.apache.hadoop1 product
- hadoop-common≥ 2.0.0, < 2.10.2 | ≥ 3.0.0-alpha, < 3.2.4 | ≥ 3.3.0, < 3.3.3
4 vendors · 4 products
References
6 links- lists.apache.org/thread/mxqnb39jfrwgs3j6phwvlrfq4mlox130X Refsource MISCWEBMailing ListVendor Advisory
- github.com/apache/hadoopPACKAGE