(Pwn2Own) iXsystems TrueNAS CORE tarfile.extractall Directory Traversal Remote Code Execution Vulnerability
The tarfile.extractall method in TrueNAS CORE does not properly validate user-supplied paths, allowing a network-adjacent attacker to write files outside the intended directory. This can be chained with other vulnerabilities to execute code as root.
Originally disclosed on Zero Day Initiative
This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of iXsystems TrueNAS devices. Authentication is not required to exploit this vulnerability.
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
Root cause
Likely the tarfile.extractall method was used without validating that each member's path stays within the intended extraction directory.
Impact
A network-adjacent attacker could execute arbitrary code as root, but only in conjunction with other vulnerabilities.
What the attacker needed
Network-adjacent access; chained with other vulnerabilities
The fix
The vulnerability was fixed by the vendor in an update.
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 a program extracts a tar archive, it should only write files inside the chosen folder. Here, it did not check the file paths inside the archive, so an attacker could include a path that escapes the folder and overwrites other files. This is called a directory traversal, and it can lead to running malicious code.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.