GHSL-2023-081_GHSL-2023-082: Tar Slip vulnerabilities in Autolab - CVE-2023-32676, CVE-2023-32317
Two tar slip vulnerabilities in Autolab allowed an authenticated instructor to upload a crafted tar archive whose entries contained path traversal sequences, causing files to be written outside the intended extraction directory. This could lead to arbitrary file write and potentially remote code execution if a written file was later executed.
Two Tar Slip vulnerabilities were found in Autolab. Those vulnerabilities could have allowed attackers to create or replace files on the file system that in the worst case could have been executed by the application or system itself.
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
The application extracted tar archives without validating that entry paths stayed within the intended directory, allowing path traversal via '../' sequences.
Impact
This issue may lead to arbitrary file write and potentially remote code execution if a written file is later executed.
What the attacker needed
Instructor account; existing course with access
The fix
The vulnerabilities were fixed and advisories were published.
How it was found
- Log in as an instructor and access a course.
- Navigate to the install assessment page.
- Upload a specially crafted tar file containing a path traversal entry.
- Submit the form to extract the archive.
- Verify that a file appears in /tmp.
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.
A tar file is like a zip archive that can contain many files. Normally, when you extract it, files should stay inside the folder you chose. Here, the program trusted the file paths inside the archive, so a malicious archive could write files anywhere on the server, like into system folders. An attacker with a teacher account could abuse this to overwrite important files, and if the server later runs one of those files, it could take over the machine.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.