Summary
WWBN AVideo versions up to and including 26.0 contain a path traversal issue in the objects/import.json.php endpoint, where a user-controlled fileURI is only checked to end with .mp4 and is not confined to the intended videos/ directory.
An authenticated user with upload permission can leverage this to read or import other users' private video files, access certain adjacent text/HTML files, and delete .mp4 and nearby text files accessible to the web server.
Affected context
The vulnerability occurs in WWBN AVideo deployments where the objects/import.json.php endpoint is exposed to authenticated users who have permission to upload or import files.
The endpoint accepts a fileURI parameter and only validates that it ends in .mp4, without restricting the resolved path to the videos/ directory or another safe location.
This contrasts with objects/listFiles.json.php, which performs a realpath() plus directory prefix check; the lack of equivalent checks in import.json.php allows access to files elsewhere on the file system that the web server can read or modify.
Exploit preconditions
- Attack surface: HTTP POST requests to
objects/import.json.phpwithin the AVideo web application. - Required access: Valid authenticated AVideo account with sufficient permission to upload/import videos.
- Trigger point: Supplying a crafted
fileURIvalue that points to a targeted.mp4file or a path that causes adjacent.txt/.html/.htmfiles to be processed. - Why exploitation is possible: The
fileURIparameter is only checked via a regex to ensure it ends with.mp4and is not normalized or constrained viarealpath()or a strict directory prefix check. As a result, users can reference arbitrary.mp4files and adjacent text/HTML files accessible to the web server, enabling unauthorized read/import and deletion operations.
Why this happens
The core issue is a classic path traversal (CWE-22) caused by failure to enforce strict directory constraints on user-supplied file paths.
The code path for objects/import.json.php relies solely on a regex check to ensure fileURI ends in .mp4, but does not:
- Normalize the path with
realpath(), and - Verify that the resolved path is inside the intended
videos/directory (or another controlled storage root).
This mismatch with the hardened behavior in objects/listFiles.json.php creates an insecure pattern where logically sensitive file operations (read/import/delete) are performed based on partially validated input, allowing users to target arbitrary files that satisfy the superficial extension check and are accessible under the web server's file permissions.
Potential impact
- An authenticated user may import other users' private video files into their own account, bypassing access controls.
- Attackers could read
.txt,.html, or.htmfiles located adjacent to any targeted.mp4file on the filesystem, potentially exposing configuration fragments, metadata, or other sensitive information. .mp4files and adjacent text/HTML files writable by the web server can be deleted, leading to data loss or service disruption.- Partial content disclosure may assist with further attacks (e.g., discovering file structures, gaining insight into deployment paths).
General mitigation guidance
Effective mitigation centers on treating any path-like input as untrusted and strictly constraining it to controlled storage locations.
Recommended defensive patterns include:
- Applying canonicalization (
realpath()or equivalent) to the user-suppliedfileURIand enforcing that the resolved path has a required directory prefix (e.g., thevideos/directory). - Avoiding the direct use of user-controlled file paths; instead, map user inputs to internal identifiers that the application translates to safe, pre-validated paths.
- Enforcing whitelists of permissible directories and disallowing any relative path segments (
.., symlinks, or absolute paths) that would escape those directories. - Aligning all file-handling endpoints (
import,list,delete) to use a shared, hardened file resolution routine rather than bespoke checks. - Ensuring the web server process runs with least-privilege filesystem permissions so that even if path validation fails, the set of files exposed is minimized.
How teams detect issues like this
To detect this class of issue, organizations can:
- Use static analysis to flag any use of user-controlled parameters in file operations (e.g.,
fopen,file_get_contents,unlink,copy) that are not routed through a common normalization and directory-check function. - Include security-focused code review checklists that explicitly ask reviewers to identify path traversal risks and verify that all file paths derived from HTTP parameters are sanitized and constrained.
- Implement application-level logging for file import and deletion operations, including the resolved file paths and calling user, and periodically review logs for abnormal access patterns (e.g., imports from unexpected directories).
- Employ web application scanners configured to probe file-handling endpoints with traversal-like input patterns to highlight cases where directory constraints are missing or ineffective.

