GHSL-2022-012: Arbitrary file write during TAR extraction in Apache Hadoop - CVE-2022-26612
The TAR extraction function in Apache Hadoop on Windows follows symbolic links without validating their targets, allowing a crafted TAR archive to write files outside the intended extraction directory. An attacker could exploit this to overwrite arbitrary files on the system.
Function unpackEntries during TAR extraction follows symbolic links (symlinks) which allows writing outside expected base directory on Windows.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This issue allows arbitrary write outside the expected extraction directory on Windows, but creating symlinks on Windows typically requires elevated privileges or Developer Mode.
What the attacker needed
Windows system; Symlink creation privilege or Developer Mode; Ability to supply a crafted TAR archive
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you extract a TAR archive, the program should keep all files inside the folder you choose. Here, on Windows, the program allowed a special kind of file (a symbolic link) to point outside that folder, and then wrote another file through that link, so files could be placed anywhere on the disk. This could let an attacker overwrite important files.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.