A bug in AVideo's API plugin lets attackers who can craft a valid APISecret payload run any command they want on your server. The issue is in the listFFmpegProcesses($keyword) helper, which builds a shell command by directly interpolating the user-supplied $keyword into a grep filter—inside single quotes, with no escaping—and then runs it with exec(). This is reachable from both the list and isKeywordRunning modes in ffmpeg.json.php, and neither applies the allowlisting that other parts of the endpoint use.
The upshot: if someone can send a crafted, validly encrypted codeToExec payload to your AVideo instance (API plugin enabled, no interactive login required), they can break out of the quoted shell context and inject arbitrary commands. The advisory demonstrates this with a payload like x'; touch /tmp/avideo_kw_rce_marker #, which creates a marker file as the web server user. Normal list output is returned, but the injected command runs as a side effect.
How the injection works
The vulnerable code looks like this:
$command .= " | grep '$keyword'";
exec($command, $output, $status);
The two API modes call this with the raw decrypted keyword field, not the sanitized one. Because the keyword is inside single quotes and unescaped, a payload that closes the quote and adds a shell command will execute as the web server user. No validation or escaping is applied at this boundary.




