/

CVE-2026-41064

Severity:

CRITICAL RISK

(9.3)

OS Command Injection in WWBN AVideo test.php

CVE-2026-41064

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WWBN AVideo versions up to and including 29.0 contain an OS command injection risk in test.php due to incomplete input sanitization on multiple download code paths.

While escapeshellarg is applied to the wget branch, the file_get_contents and curl branches still accept loosely validated URLs, enabling crafted inputs that bypass the /^http/ regex check and potentially lead to command execution in certain environments.

Affected context

The vulnerability manifests in AVideo deployments that expose test.php and allow user-controlled URLs to be passed into that script.

The protection added with escapeshellarg only hardens the wget invocation, while alternative retrieval paths using file_get_contents and curl still rely on a weak regular expression (/^http/) to vet URLs.

Environments where these functions interact with shell commands, system utilities, or follow redirects in unsafe ways are particularly at risk.

Exploit preconditions

  • Attack surface: Web-accessible test.php endpoint (or any code path using the same logic).
  • Required access: Ability to send HTTP requests that control the URL parameter consumed by test.php.
  • Trigger point: Submission of a crafted URL that passes the /^http/ regex but is interpreted in a way that influences downstream command or system interactions.
  • Why exploitation is possible: Input validation is limited to checking that the string starts with http, which does not robustly constrain the scheme, host, or structure.

Unsanitized values are then passed through file_get_contents and curl code paths, leaving room for unexpected behavior and command injection where these workflows ultimately invoke or influence shell commands.

Why this happens

At its core, this is an OS Command Injection (CWE-78) issue caused by incomplete input sanitization across multiple execution paths.

An earlier fix correctly recognized the risk of passing user-supplied URLs into wget and wrapped that argument in escapeshellarg, but did not apply equivalent hardening or structural validation to the file_get_contents and curl branches.

Combined with a permissive regex (/^http/) that allows malformed or attacker-controlled URLs like httpevil[.]com, the application continues to treat loosely validated external input as safe, leaving room for user-controlled data to influence security-sensitive operations.

Potential impact

  • Remote execution of arbitrary OS commands under the web server's privileges in vulnerable configurations
  • Download and execution of attacker-controlled payloads on the server
  • Unauthorized access to internal network resources via server-side request forgery (SSRF)-style behavior
  • Exfiltration or manipulation of sensitive data accessible from the AVideo server
  • Service disruption or denial of service by forcing resource-intensive or malicious external calls

General mitigation guidance

Mitigation should focus on strictly constraining and decoupling user input from any command or network-sensitive operations:

  • Treat all user-provided URLs as untrusted and apply strict allowlists for schemes (e.g., http / https) and hostname patterns.
  • Use robust URL parsing APIs to validate host, scheme, and path instead of relying on simple regular expressions like /^http/.
  • Avoid constructing shell commands with user input altogether; rely on high-level HTTP client libraries that do not invoke shells.
  • When shell interaction is unavoidable, ensure every parameter is independently escaped and avoid building commands via string concatenation.
  • Run the web server and associated helper processes with the least privileges needed, and minimize outbound network permissions to restrict where the server can connect.
  • Consider disabling or tightly controlling diagnostic endpoints like test.php in production environments.

How teams detect issues like this

Detection can leverage both code-focused and behavior-focused approaches:

  • Static analysis: Flag any use of shell_exec, exec, system, backticks, or similar functions where arguments incorporate request parameters, especially URLs, without strict validation and escaping.
  • Code review: Look for weak validation patterns such as /^http/ or other minimal regex checks guarding security-sensitive operations, and identify duplicated logic where some branches are sanitized and others are not.
  • Policy enforcement: Enforce secure coding guidelines that prohibit building command-line strings directly from user input and that mandate centralized URL validation helpers.
  • Runtime monitoring: Use application and web server logs to detect abnormal outbound connections or repeated calls to test.php with malformed URLs, which may indicate probing or exploitation attempts.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/1e6cf03e93b5a5318204b010ea28440b0d9a5ab3
github.comgithub.com/WWBN/AVideo/commit/78bccae74634ead68aa6528d631c9ec4fd7aa536
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-3fpm-8rjr-v5mc
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-pq8p-wc4f-vg7j

Frequently asked

questions

Yes. If test.php or equivalent functionality is exposed over the network and accepts user-controlled URLs, an attacker can exploit the issue remotely without local access.

That depends entirely on how test.php is integrated.

If it is reachable without authentication or is used in a public-facing workflow, exploitation may be possible by any remote user.

If it is protected behind authentication or IP restrictions, an attacker would need to satisfy those access controls first.

The safest pattern is to eliminate any shell-based processing of user-provided URLs and centralize URL handling via trusted HTTP client libraries with strong validation.

All code paths (wget, file_get_contents, curl, or others) should share a single, strict validation routine that enforces allowed schemes and hosts.

Adopt secure coding guidelines that forbid passing raw request parameters into command execution or low-level system utilities, require robust input validation helpers for URLs and other complex types, and use automated code scanning to flag any security-sensitive functions that depend on untrusted data.

Find out what's already
exploitable in your codebase.