WWBN AVideo aVideoEncoder unzipDirectory directory traversal vulnerability
The unzipDirectory function in AVideo extracts uploaded zip files without checking for directory traversal paths, allowing an attacker to write PHP files outside the intended directory. An attacker with upload permission could then execute arbitrary commands on the server.
Originally disclosed on Cisco Talos
A directory traversal vulnerability exists in the unzipDirectory functionality of WWBN AVideo 11.6 and dev master commit 3f7c0364. A specially-crafted HTTP request can lead to arbitrary command execution.
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 unzipDirectory function calls the unzip command without validating that extracted file paths stay within the destination directory, allowing path traversal.
Impact
An attacker with upload permission could execute arbitrary commands on the server, leading to full compromise.
What the attacker needed
Permission to upload videos
The fix
The vendor fixed the issue on July 7th 2022.
How it was found
- Create a zip file containing a PHP file with a path that goes up one directory.
- Upload the zip file to the aVideoEncoder.json.php endpoint with format=zip and a resolution parameter.
- Access the uploaded PHP file via the videos directory to execute commands.
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 zip file can contain file names with '../' which means 'go up one folder'. When the server unzips such a file, it may write files outside the intended folder. Here, an attacker uploaded a zip containing a PHP script that ended up in a web-accessible folder, letting them run commands on the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.