# CVE-2022-25168: Command injection in org.apache.hadoop.fs.FileUtil.unTarUsingTar

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.71%, higher than 92% of CVEs (2026-12-01)
- Published: 2022-08-04T14:30:17.000Z
- Modified: 2026-06-17T04:33:08.390Z
- Also known as: GHSA-8wm5-8h9c-47pc
- Weaknesses: CWE-78, CWE-88
- Assigned by: apache

## 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).

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache Hadoop: 2.0.0 to 2.10.1; 3.0.0-alpha to 3.2.3; 3.3.0 to 3.3.2
- org.apache.hadoop:hadoop-common (Maven): from 2.0.0 before 2.10.2; from 3.0.0-alpha before 3.2.4; from 3.3.0 before 3.3.3
- apache hadoop: from 2.0.0 up to 2.10.1; from 3.0.0 up to 3.2.3; from 3.3.0 up to 3.3.2

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://lists.apache.org/thread/mxqnb39jfrwgs3j6phwvlrfq4mlox130> (mailing-list, vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220915-0007/> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25168> (advisory)
- <https://github.com/apache/hadoop/commit/cae749b076f35f0be13a926ee8cfbb7ce4402746> (web)
- <https://github.com/apache/hadoop> (package)
- <https://security.netapp.com/advisory/ntap-20220915-0007> (web)

## Sources

- CVE List: [CVE-2022-25168](https://www.cve.org/CVERecord?id=CVE-2022-25168), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-8wm5-8h9c-47pc](https://github.com/advisories/GHSA-8wm5-8h9c-47pc), CC-BY-4.0, modified 2024-02-21
- NVD: [CVE-2022-25168](https://nvd.nist.gov/vuln/detail/CVE-2022-25168), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25168 · Whole record: https://cve.day/CVE-2022-25168.json · Rebuilt by cve.day 2026-11-25T22:58:13.391Z
