Mar 2, 2026·5 min read·23 visits
Authenticated administrators can achieve Remote Code Execution (RCE) on AVideo instances by uploading a malicious ZIP file. The application insecurely extracts the archive using the system 'unzip' command, allowing attackers to write PHP shells to the webroot. Fixed in commit b739aeeb.
A critical remote code execution (RCE) vulnerability exists in AVideo (formerly YouPHPTube) within the plugin import functionality. The flaw stems from the insecure use of OS-level commands to extract uploaded ZIP archives without validating their contents. An authenticated administrator can exploit this to upload and execute arbitrary PHP code on the server, leading to full system compromise. The vulnerability involves multiple weakness classes, including OS Command Injection (CWE-78) and Unrestricted File Upload (CWE-434).
The AVideo platform (formerly YouPHPTube) provides a plugin architecture that allows administrators to extend functionality by uploading compressed archives. This feature is handled by the objects/pluginImport.json.php script. The vulnerability resides in how this script processes uploaded ZIP files.
Instead of using secure, native PHP libraries to handle file extraction, the application relies on passing user-supplied file paths directly to the underlying operating system's unzip utility via the exec() function. This implementation fails to enforce strict boundaries on the extraction process.
By crafting a malicious ZIP archive, an attacker can introduce arbitrary files into the application's web root. Since AVideo is a PHP application, the ability to write .php files to a web-accessible directory allows for immediate Remote Code Execution (RCE). The vulnerability combines elements of insecure file upload and command injection risks.
The root cause of this vulnerability is the unsafe implementation of the archive extraction logic in objects/pluginImport.json.php. The application performs a superficial check on the file extension but fails to validate the internal structure or contents of the archive before processing it.
Specifically, the code constructs a shell command using the uploaded file's temporary path and executes it using exec():
// Vulnerable logic pattern
exec("unzip {$path} -d {$destination}");This approach introduces several critical security flaws:
.php, .phtml, .htaccess). If the ZIP contains a PHP web shell, unzip will faithfully extract it to the destination directory.unzip utility may allow directory traversal (ZipSlip) if not invoked with specific flags, potentially allowing files to be written outside the intended directory structure.exec() creates a risk of OS command injection if the filename variables can be manipulated by the attacker.The following analysis compares the vulnerable implementation with the remediated code from commit b739aeeb9ce34aed9961d2c155d597810f8229db.
Vulnerable Code (Pre-Patch):
The original code relied on exec() and failed to validate the extracted files.
// Vulnerable: Direct shell execution
if (strcasecmp($extension, 'zip') == 0) {
$destination = "{$global['systemRootPath']}plugin/";
// $path is the temp file path from $_FILES
exec("unzip {$path} -d {$destination}");
}Patched Code:
The fix replaces the shell command with PHP's native ZipArchive class and introduces rigorous validation logic.
// Remediated: Use ZipArchive and validate contents
$zip = new ZipArchive;
if ($zip->open($path) === TRUE) {
// 1. Iterate through all files BEFORE extraction
for($i = 0; $i < $zip->numFiles; $i++) {
$filename = $zip->getNameIndex($i);
// 2. Prevent Path Traversal and Dangerous Extensions
if (preg_match('/\\.\\.|\\/|\\\\/', $filename) ||
preg_match('/\\.(php|phtml|phar|cgi|pl|py|rb|sh|exe|dll|bat|cmd|sh)$/i', $filename)) {
// Abort if dangerous file found
return false;
}
}
// 3. Safe Extraction
$zip->extractTo($destination);
$zip->close();
}The patch ensures that no file inside the ZIP contains directory traversal characters (..) or executable extensions. It fundamentally changes the mechanism from a blind OS command to a managed, inspected extraction process.
To exploit this vulnerability, an attacker requires administrative access to the AVideo dashboard. The exploitation flow is straightforward due to the lack of server-side validation.
Step 1: Payload Creation
The attacker creates a standard ZIP archive containing a PHP web shell. For example, a file named shell.php containing <?php system($_GET['cmd']); ?> is zipped into exploit.zip.
Step 2: Upload
The attacker navigates to the Plugin Manager interface and uses the "Import Plugin" feature to upload exploit.zip. The application accepts the file because it has a .zip extension.
Step 3: Execution
Upon upload, the server executes unzip, extracting shell.php into the plugin/ directory. The attacker then accesses the shell directly via HTTP:
GET /plugin/shell.php?cmd=id HTTP/1.1
Host: target-avideo.com
If successful, the server responds with the output of the id command, confirming code execution with the privileges of the web server user (www-data).
The impact of this vulnerability is critical, although it is mitigated by the requirement for administrative authentication. Successful exploitation grants the attacker full control over the web application and the underlying server.
Confidentiality: Attackers can read sensitive configuration files, including configuration.php, which typically contains database credentials and API keys.
Integrity: Attackers can modify application source code, inject malware into video streams, or deface the platform.
Availability: The attacker can delete files, drop databases, or shut down the service entirely.
While the requirement for authentication lowers the likelihood of opportunistic attacks, this vector is highly dangerous in scenarios involving compromised admin credentials or insider threats. The CVSS score reflects this with a High severity rating.
Administrators must upgrade AVideo immediately to a version including the fix. The specific patch is located in commit b739aeeb9ce34aed9961d2c155d597810f8229db.
Primary Fix: Update the AVideo instance using the built-in updater or by pulling the latest changes from the official GitHub repository. The fix removes the exec call and enforces strict file extension whitelisting.
Defense in Depth:
exec(): If possible, disable the exec(), system(), and passthru() functions in the php.ini configuration file (disable_functions) to prevent command execution vulnerabilities.plugin/ directory is not writable by the web server user if plugin uploads are not frequently required, or restrict execution of PHP files in upload directories using .htaccess or Nginx configuration.CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
AVideo WWBN | < commit b739aeeb9ce34aed9961d2c155d597810f8229db | Commit b739aeeb9ce34aed9961d2c155d597810f8229db |
| Attribute | Detail |
|---|---|
| Vulnerability Type | Remote Code Execution (RCE) |
| Attack Vector | Network (Authenticated) |
| CWE IDs | CWE-78, CWE-434, CWE-22 |
| CVSS Score | 7.2 (High) |
| Affected Component | objects/pluginImport.json.php |
| Root Cause | Unsafe extraction of ZIP archives via exec() |
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
A client-side HTML sanitization bypass vulnerability exists in the Bleach library where the formaction attribute is not recognized as a URI. This allows attackers to inject javascript: URIs when formaction is on the allowed list, resulting in Cross-Site Scripting (XSS).
A reflected DOM-based Cross-Site Scripting (XSS) vulnerability was identified in Nuxt's core <NuxtLink> component. Prior to the patched versions, the component failed to validate or sanitize the target URI schemes before directly rendering them into the 'href' attribute of native HTML anchor elements. An attacker who controls the input bound to the 'to' or 'href' properties can inject executable URI schemes, such as 'javascript:' or 'data:', leading to arbitrary script execution in the context of the user's browser session.
A state persistence vulnerability exists in Tornado's CurlAsyncHTTPClient component where pooled pycurl.Curl handles are reused across asynchronous requests without a complete state reset. Consequently, sensitive per-request configurations, such as client TLS certificates or proxy basic authentication credentials, persist on the shared handle. This behavior leads to subsequent requests leaking these credentials to unauthorized remote servers.
CVE-2026-48748 is a denial-of-service vulnerability in Netty's HTTP/3 codec (netty-codec-http3) occurring when QPACK dynamic tables are enabled but the blocked streams limit is not explicitly configured. A bug in limit checking and a memory leak in stream tracking allow unauthenticated remote attackers to exhaust the JVM heap memory and crash the server.
CVE-2026-50009 is a cryptographic design vulnerability in the Netty network application framework. Prior to version 4.2.15.Final, the framework's QUIC protocol implementation fails to cryptographically segregate the generated Connection IDs and the associated Stateless Reset Tokens. An on-path network attacker who sniffs traffic during a Connection ID rotation can extract secret token material from cleartext headers, enabling them to inject spoofed reset packets and terminate active connections.
A critical hostname verification bypass vulnerability exists in the Netty network application framework when configured as a TLS client. When a developer registers a custom plain X509TrustManager, Netty wraps it inside an X509TrustManagerWrapper to adapt it to the X509ExtendedTrustManager API. However, this wrapper discards the SSLEngine context, bypassing critical hostname checks. Because the wrapper is identified as an X509ExtendedTrustManager, standard cryptographic engines and Netty's OpenSSL wrappers do not re-wrap it, failing to execute any hostname validation. Consequently, clients silently accept certificates for any host, enabling unauthenticated Man-in-the-Middle (MitM) attacks.