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

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 5% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-08-04 · Modified: 2024-08-03
- Aliases: CGA-4gc9-rr3p-24cx, GHSA-8wm5-8h9c-47pc, CGA-rjmg-22vw-2v38, CGA-w79q-c4ww-4v4q, CGA-wh9m-p8c6-rwg7
- Record: https://cvemate.com/vulnerability/CVE-2022-25168 · JSON: https://cvemate.com/vulnerability/CVE-2022-25168/json

## Description

```text
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).
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 4.828%, percentile 92.226%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## 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
- apache hadoop: ≥ 2.0.0, ≤ 2.10.1 \| ≥ 3.0.0, ≤ 3.2.3 \| ≥ 3.3.0, ≤ 3.3.2
- chainguard hadoop-fips-3.3.6 (Chainguard): All versions (No fix recorded)
- org.apache.hadoop hadoop-common (Maven): ≥ 2.0.0, \< 2.10.2 \| ≥ 3.0.0-alpha, \< 3.2.4 \| ≥ 3.3.0, \< 3.3.3

## References

- <https://lists.apache.org/thread/mxqnb39jfrwgs3j6phwvlrfq4mlox130>
- <https://security.netapp.com/advisory/ntap-20220915-0007/>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25168>
- <https://github.com/apache/hadoop/commit/cae749b076f35f0be13a926ee8cfbb7ce4402746>
- <https://github.com/apache/hadoop>
- <https://security.netapp.com/advisory/ntap-20220915-0007>

---

Data as of 2026-12-05T04:25:01.326Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
