/

CVE-2026-33354

Severity:

HIGH RISK

(7.6)

Improper File Path Handling in WWBN AVideo Encoder Upload

CVE-2026-33354

Analyzed

Vulnerability type

Category:

Improper File Path Handling

CWE:

CWE-73

Impact:

Arbitrary Local File Read

Severity:

HIGH RISK

(7.6)

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 up to version 26.0 exposes an arbitrary local file read via the POST /objects/aVideoEncoder.json.php endpoint, where authenticated uploaders can control the chunkFile path.

By pointing chunkFile to readable files under allowed server directories, an attacker can have the application copy those files into their own public video area and download them over HTTP.

Affected context

This vulnerability appears in WWBN AVideo deployments that:

  • Enable the encoder-related endpoint POST /objects/aVideoEncoder.json.php
  • Allow authenticated users to upload or edit their own videos
  • Rely on isValidURLOrPath() to validate local paths for staged upload chunks

The risk is highest where sensitive application configuration, logs, or cached data reside under permitted directories such as /var/www/, the AVideo application root, cache, tmp, or videos, and are readable by the web server.

Exploit preconditions

  • Attack surface: HTTP interface on the AVideo application, specifically POST /objects/aVideoEncoder.json.php
  • Required access: Authenticated AVideo account with permission to upload or edit its own video content
  • Trigger point: Supplying a crafted chunkFile parameter that references an attacker-chosen local file path that passes isValidURLOrPath()
  • Why exploitation is possible: The endpoint treats a requester-controlled path as a trusted upload chunk location, allowing the backend to copy arbitrary readable files from broadly allowed directories into the attacker's public video storage path, which is then accessible over HTTP.

Why this happens

The core issue is improper restriction of file paths used by server-side file operations, aligning with CWE-73: External Control of File Name or Path.

Instead of binding chunkFile to a server-generated, narrowly scoped upload directory, the implementation relies on isValidURLOrPath() which accepts a wide set of filesystem locations and only blocks .php files.

This design treats user-controlled file paths as if they were trusted, enabling access to local files that should not be exposed through the upload workflow.

Potential impact

  • An authenticated uploader may read configuration files under /var/www/ or the application root that could disclose database credentials or API keys.
  • Attackers could access internal logs stored under cache or tmp, potentially revealing session identifiers, internal error traces, or user data.
  • Exposure of other users' video assets or generated content stored in videos or related directories.
  • Facilitation of further attacks (e.g., account takeover, lateral movement) using leaked secrets obtained from local file reads.

General mitigation guidance

Effective mitigation focuses on strictly controlling server-side file paths and decoupling them from user input.

Recommended patterns include:

  • Constraining chunkFile to server-generated identifiers or filenames, resolving them exclusively within a dedicated, non-sensitive upload directory.
  • Replacing general-purpose helpers like isValidURLOrPath() with logic that enforces a fixed, canonical base directory and rejects any attempts to escape it.
  • Avoiding direct use of user-supplied paths in file copy operations; instead, map untrusted input to internal references (e.g., IDs) and derive the actual filesystem path on the server.
  • Storing sensitive configuration and logs outside web-accessible and upload-related directories and applying least-privilege filesystem permissions for the web server user.
  • Applying defense-in-depth by ensuring that even if files are copied to public areas, they do not contain secrets or executable server-side code.

How teams detect issues like this

Detection can rely on a mix of code-centric and operational approaches:

  • Static analysis: Flag any file operations (copy, read, move) where the path is derived directly or indirectly from HTTP parameters such as chunkFile. Tools can look for patterns where validation merely checks extension or directory prefixes rather than enforcing strict path derivation.
  • Code review: During manual review, pay special attention to upload pipelines and encoder integrations. Signals include helper methods with broad directory whitelists, reliance on blacklist-style checks (e.g., "not .php"), or acceptance of absolute paths from user input.
  • Runtime monitoring: Analyze access logs for the encoder endpoint and subsequent downloads, looking for unusual file patterns or repeated attempts to access non-standard chunk paths.
  • Security testing: Incorporate tests in CI that attempt to supply internal paths (config, log, or cache files) through upload-related parameters, verifying that the application rejects them.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/59bbd601a3f65a5b18c1d9e4eb11471c0a59214f
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-4jw9-5hrc-m4j6

Frequently asked

questions

Yes, if the AVideo instance is exposed over the internet and user registration or uploader access is available. However, exploitation still requires an authenticated account with the ability to upload or edit videos.

The attacker needs valid credentials for an account that can act as an uploader on the platform, specifically the ability to submit requests to POST /objects/aVideoEncoder.json.php that reference their own video resources.

The safest pattern is to eliminate user-controlled filesystem paths from the upload flow: accept only server-generated identifiers or filenames, resolve them within a dedicated upload directory, and prevent any path that does not conform to that controlled mapping.

Adopt a secure design rule that untrusted input is never used directly as a filesystem path. Use strict path canonicalization, confine file operations to predefined directories, perform security-focused code reviews on upload and encoder features, and integrate static analysis rules that flag external control of file names and paths.

Find out what's already
exploitable in your codebase.