CVE-2026-45578: WWBN AVideo Live: OS command injection in on_publish.php execAsync via unescaped m3u8 URL

Published May 15, 2026
·
Updated

Summary

Type: Classic shell-metacharacter injection. The YPTSocket notification branch in plugin/Live/onpublish.php builds an execAsync() command line by string concatenation, single-quoting each argument but never calling escapeshellarg(). A ' in any of the three interpolated values ($usersid, $m3u8, $obj->liveTransmitionHistoryid) closes the quoted token and lets the attacker append arbitrary commands. File: plugin/Live/onpublish.php, line 267. Root cause: the developer wrapped each variable in literal single quotes ('$usersid', '$m3u8', '$obj->liveTransmitionHistoryid') believing this provides shell-quoting. PHP single-quoted-into-shell is not safe quoting; it is just two literal quote characters that the shell pairs greedily. Any embedded ' closes the outer string and resumes interpretation in the shell. The rest of the AVideo codebase already calls escapeshellarg() (137 call sites across the project) for ffmpeg invocations, so the safe primitive is well-known to the project; it was simply omitted from this branch. The endpoint is web-reachable (no .htaccess rule restricts onpublish.php, no REMOTEADDR check), so the trigger is a direct HTTP POST without going through nginx-rtmp.

Affected Code

File: plugin/Live/onpublish.php, lines 256-271.

php if (AVideoPlugin::isEnabledByName('YPTSocket')) { $array = setLiveKey($lth->getKey(), $lth->getLiveserversid()); @obclean(); obstart(); $lth = new LiveTransmitionHistory($obj->liveTransmitionHistoryid); $m3u8 = Live::getM3U8File($lth->getKey(), false, true); // value-carrying URL: contains the stream key verbatim $usersid = $obj->row['usersid']; $liveTransmitionHistoryid = $obj->liveTransmitionHistoryid; if (strtoupper(substr(PHPOS, 0, 3)) === 'WIN') { include "{$global['systemRootPath']}plugin/Live/onpublishsocketnotification.php"; } else { $command = getphp(). " {$global['systemRootPath']}plugin/Live/onpublishsocketnotification.php '$usersid' '$m3u8' '{$obj->liveTransmitionHistoryid}'"; // <-- BUG: literal quotes, no escapeshellarg $pid = execAsync($command); // sink: shell exec } }

Live::getM3U8File($key, false, true) (Live.php:1337-1350 -> Live.php:4845-4889) returns "{$playerServer}{$uuid}.m3u8" (or "{$playerServer}{$uuid}/index.m3u8") where $uuid = $this->getKeyWithIndex(...) is the stream key string read straight out of the livetransmitions table. There is no character normalisation between database read and command construction.

Why it's wrong: '$m3u8' is not shell quoting. PHP interpolates $m3u8 into the string between two literal ' characters. The shell then tokenises the result. If $m3u8 contains ' itself, the shell sees '…' followed by <attacker bytes> followed by another ', which forms two adjacent quoted strings concatenated with whatever the attacker put between them. Embedded ;, backticks, $(), &&, |, or \n then run as shell commands. The fix is escapeshellarg(), which AVideo already uses 137 times in ffmpeg invocations (e.g. getVideos.php:1069, videos.json.php, aVideoEncoder.json.php); this branch simply forgot it.

Exploit Chain

1. Attacker authenticates and arranges for one of the command variables to contain '. Under the current code the readily available primitive is a canStream user supplying a stream key via the persistence path (saveLive.php's $REQUEST['key'] is written verbatim to livetransmitions.key). State: a row exists with key = "evilkey';id>/tmp/pwn;#". 2. Attacker POSTs directly to https://target/plugin/Live/onpublish.php (the file is web-served, no IP restriction) with body: name=evilkey';id>/tmp/pwn;# p=<md5(attackerpassword)> tcurl=rtmp://target/live addr=1.2.3.4 onpublish.php:117 runs pregreplace("/[&=]/", '', $POST['name']) — only &/= are stripped, so ';id>/tmp/pwn;# survives. Lines 143-163 confirm $GET['p'] === $user->getPassword() (the attacker is themself, knows their own MD5), persist a LiveTransmitionHistory row with the poisoned key, and set $obj->error = false. State: authorisation gate passed. 3. Line 261 calls Live::getM3U8File($lth->getKey(), false, true), returning "https://server/live/evilkey';id>/tmp/pwn;#.m3u8". State: $m3u8 carries the injection payload. 4. Line 267 builds the command string by concatenation: php /var/www/AVideo/plugin/Live/onpublishsocketnotification.php '7' 'https://server/live/evilkey';id>/tmp/pwn;#.m3u8' '42' Shell tokenisation sees: php, …/onpublishsocketnotification.php, '7', 'https://server/live/evilkey' (the attacker's ' closed the second quote), then operator ;, then command-2 id>/tmp/pwn, then ;, then #.m3u8' '42' (everything after # is a comment). State: the shell has parsed two real commands. 5. Line 269 execAsync($command) spawns the shell, which runs the secondary command id>/tmp/pwn as the AVideo PHP-FPM/Apache user. State: arbitrary OS command execution with the privileges of the web-server runtime user. 6. Final state: the attacker reads /tmp/pwn, swaps the payload for a reverse shell, exfiltrates videos/configuration.php (database password and root URL), drops a webshell into the upload tree, or pivots to other plugin credentials (PayPal/Stripe API keys, AWS keys for the CDN plugin, OpenAI key for the AI plugin).

Security Impact

Severity: sec-high. Pre-auth-friendly remote code execution: the only prerequisite is that the attacker can place a ' into one of the three command-line variables, which on a streaming platform means a single low-privilege account. Attacker capability: with one canStream account and two HTTP requests, the attacker executes arbitrary shell commands as the AVideo runtime user. From there: read database credentials, exfiltrate user data, write a webshell into a publicly-served path, pivot to plugin credentials, persist via cron, or escalate via any local sudoers entries. Preconditions: AVideo deployment with Live and YPTSocket plugins enabled (the standard live-streaming bundle); attacker can reach /plugin/Live/onpublish.php over the network; a value containing ' is reachable into usersid, m3u8, or liveTransmitionHistoryid (the current code lets canStream users supply such a value via the stream-key persistence path). Differential: source-inspection-verified end-to-end. The shell-tokenising behaviour of '…'…'…' is reproducible offline:

sh $ s="php /a/b.php '7' 'https://s/live/evilkey';id>/tmp/pwn;#.m3u8' '42'" $ rm -f /tmp/pwn; bash -c "$s" 2>/dev/null; ls -l /tmp/pwn -rw-r--r-- 1 user user N <date> /tmp/pwn # injected id ran, output captured

The patched build (with the suggested escapeshellarg() fix below applied) constructs php /a/b.php '7' 'https://s/live/evilkey'\''id>/tmp/pwn;#.m3u8' '42', which the shell parses as a single argument containing the literal characters; the second command never runs.

Suggested Fix

Use escapeshellarg() on every variable interpolated into the command string. This matches established project conventions (137 other call sites for ffmpeg invocations).

diff --- a/plugin/Live/onpublish.php +++ b/plugin/Live/onpublish.php @@ -264,7 +264,11 @@ if (strtoupper(substr(PHPOS, 0, 3)) === 'WIN') { include "{$global['systemRootPath']}plugin/Live/onpublishsocketnotification.php"; } else { - $command = getphp(). " {$global['systemRootPath']}plugin/Live/onpublishsocketnotification.php '$usersid' '$m3u8' '{$obj->liveTransmitionHistoryid}'"; + $command = getphp() + . ' ' . escapeshellarg($global['systemRootPath'] . 'plugin/Live/onpublishsocketnotification.php') + . ' ' . escapeshellarg((string) $usersid) + . ' ' . escapeshellarg((string) $m3u8) + . ' ' . escapeshellarg((string) $obj->liveTransmitionHistoryid); errorlog("NGINX Live::onpublish YPTSocket start ($command)"); $pid = execAsync($command); }

Defence-in-depth: onpublish.php is the nginx-rtmp webhook and should not be reachable from the public Internet. Add an .htaccess/nginx location rule restricting the file to 127.0.0.1 and any configured RTMP server IPs. That blocks the trigger path independently of the sanitisation work.

Other sources

WWBN AVideo is an open source video platform. In 29.0 and earlier, there is a classic shell-metacharacter injection. The YPTSocket notification branch in plugin/Live/onpublish.php builds an execAsync() command line by string concatenation, single-quoting each argument but never calling escapeshellarg(). A ' in any of the three interpolated values ($usersid, $m3u8, $obj->liveTransmitionHistoryid) closes the quoted token and lets the attacker append arbitrary commands.

MITRE

Affected Software

2 affected components
composer/WWBN/AVideo<=29.0
WWBN AVideo<=29.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Add an .htaccess/nginx location rule so `plugin/Live/on_publish.php` is not reachable from the public Internet; allow only `127.0.0.1` and any configured RTMP server IPs.

    AVideo nginx/apache web server location/access restriction for plugin/Live/on_publish.php = Restrict to 127.0.0.1 and any configured RTMP server IPs
  2. Configuration

    In `plugin/Live/on_publish.php`, wherever the code builds the `execAsync($command)` command line by concatenation with single-quoted variables, replace that logic with `escapeshellarg()` for each interpolated value, including `$m3u8`, `$obj->liveTransmitionHistory_id`, and `$users_id` (and the php/systemRootPath command parts as applicable). This prevents `'` in `$m3u8`/`users_id`/`liveTransmitionHistory_id` from closing the quoted token and injecting shell metacharacters.

    AVideo plugin/Live/on_publish.php (YPTSocket notification branch) Shell argument quoting for execAsync() = Use escapeshellarg() for every variable interpolated into the constructed command string

Event History

May 15, 2026
Advisory Published
via GitHub·06:32 PM
Data Sourced
via GitHub·06:32 PM
DescriptionSeverityWeaknessAffected Software
May 29, 2026
CVE Published
via MITRE·01:14 PM
Data Sourced
via MITRE·01:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-45578?

CVE-2026-45578 is classified as a high-severity vulnerability due to its risk of shell metacharacter injection.

2

How do I fix CVE-2026-45578?

To fix CVE-2026-45578, ensure that the command-line arguments are properly sanitized by using escapeshellarg() on each interpolated value before executing the command.

3

Which software is affected by CVE-2026-45578?

CVE-2026-45578 affects the WWBN/AVideo software version 29.0 and earlier.

4

What are the potential impacts of CVE-2026-45578?

The potential impact of CVE-2026-45578 includes arbitrary command execution on the server if exploited by a malicious user.

5

How can I determine if my application is vulnerable to CVE-2026-45578?

You can determine if your application is vulnerable to CVE-2026-45578 by checking if it runs WWBN/AVideo version 29.0 or earlier and inspecting the on_publish.php file for the use of unescaped arguments in execAsync().

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203