CVE-2022-25168Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar
- 9.8CriticalCVSS base score
- 4.6%Exploitation in 30 daysEPSS · top 8.2% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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).
Timeline
ID reserved
By apache
- 6 months later
· 6 months later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 4.6% · top 8.2% of all CVEs (16 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
Apache Software Foundation · Apache Hadoop
- affected 2.0.0 to 2.10.1
- affected 3.0.0-alpha to 3.2.3
- affected 3.3.0 to 3.3.2
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.apache.hadoop:hadoop-commonGHSA-8wm5-8h9c-47pc (opens in a new tab)
What to do
Workaround: Users should upgrade to Apache Hadoop 2.10.2, 3.2.4, 3.3.3 or upper (including HADOOP-18136).
References
References2
- https://lists.apache.org/thread/mxqnb39jfrwgs3j6phwvlrfq4mlox130 (opens in a new tab)x_refsource_MISCx_transferred
- https://security.netapp.com/advisory/ntap-20220915-0007/ (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-6521 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8wm5-8h9c-47pc (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-25168)Record last updated .