CVE-2022-25168: Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar
Vulnerability summary
CVE-2022-25168 is a critical (CVSS 9.8) vulnerability in apache software foundation apache hadoop. EPSS estimates a 4.83% chance of exploitation in the next 30 days, higher than 92.2% of scored vulnerabilities.
Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 5% (FIRST, 04-12-2026)
Source freshness unavailable
How is this decided?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.83%
Chance of exploitation in the next 30 days
Percentile
92%
Versus all other CVEs
30-day change
Increase +0.24 pp
From 4.59% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
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