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
chunkFileparameter that references an attacker-chosen local file path that passesisValidURLOrPath() - 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
cacheortmp, potentially revealing session identifiers, internal error traces, or user data. - Exposure of other users' video assets or generated content stored in
videosor 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
chunkFileto 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.

