The vulnerability, identified as GHSA-2f9h-23f7-8gcx, allows for a complete application takeover of AVideo during an uninitialized deployment. The root cause is a lack of authentication on the installer script, install/checkConfiguration.php. This script is responsible for critical setup operations, including database initialization, admin account creation, and writing the main configuration file.
An attacker can exploit this by sending a direct POST request to /install/checkConfiguration.php on a new or uninitialized AVideo instance. The script uses raw $_POST data to perform its functions, which allows the attacker to:
- Point the application to an attacker-controlled database.
- Set the administrator password, gaining full control.
- Inject arbitrary SQL due to unsanitized input (
$_POST['contactEmail']) being concatenated directly into an SQL query for user creation.
The patch b3fa7869dcb935c8ab5c001a88dc29d2f92cf8e1 rectifies these issues by:
- Implementing a CSRF token check, ensuring that the installation can only be triggered from a legitimate session that has loaded the installation wizard (
install/index.php).
- Replacing the vulnerable SQL query with a prepared statement, thus mitigating the SQL injection vulnerability.
The primary vulnerable component is the install/checkConfiguration.php script itself. As the code is executed in the global scope of the script rather than within a defined function, a runtime profiler would indicate the execution of this script as the entry point of the attack.