WWBN AVideo .htaccess sample incomplete blacklist vulnerability
The .htaccess file that blocks script execution in the videos directory does not include the .phar extension. An attacker could upload a .phar file and execute arbitrary code on the server.
Originally disclosed on Cisco Talos
An incomplete blacklist exists in the .htaccess sample of WWBN AVideo 14.4 and dev master commit 8a8954ff. A specially crafted HTTP request can lead to a arbitrary code 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
Impact
An attacker could upload a .phar file and execute arbitrary code on the server, but only if the PHP PHAR module is enabled, which is the default in AVideo's Dockerfile.
What the attacker needed
PHAR module enabled (default in Dockerfile); ability to upload a .phar file to videos/ directory
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 website stores user-uploaded videos in a folder and uses a configuration file to stop any scripts in that folder from running. The list of blocked file types missed one type, .phar, which PHP can run like a normal script. So someone could upload a malicious .phar file and the server would execute it.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.