Summary
A path traversal vulnerability in AVideo's ADs plugin can let an authenticated user with custom ads delete files outside the intended image location. If the vulnerable deletion endpoint receives an unvalidated is_regular_user value, it may target another user's ads or other files, potentially disrupting the site.
Affected context
The issue is reported in WWBN AVideo versions 12.4 through 29.7.1, in the ADs plugin's deleteImage.json.php endpoint. It becomes relevant when an authenticated user with custom ads can reach the image-deletion functionality and influence the is_regular_user parameter. The extent of impact depends on the files accessible to the application process.
Exploit preconditions
- Attack surface: The ADs plugin image-deletion endpoint.
- Required access: An authenticated account with the ability to manage custom ads or invoke the relevant deletion function.
- Trigger point: Processing a deletion request that uses the
is_regular_userparameter to determine a file path. - Why exploitation is possible: The parameter is not adequately validated or constrained to the intended user and directory, allowing a path to resolve outside the expected location.
Why this happens
The endpoint uses user-influenced data in file path construction without reliably restricting the resulting path to an approved directory. This is a path traversal weakness, CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The insecure pattern is trusting a supplied identifier or path component when selecting a file to delete, rather than validating it and enforcing directory boundaries.
Potential impact
- An attacker may delete other users' ad files.
- Files outside the intended ads directory could be deleted if accessible to the application process.
- Deletion of important application files could disrupt the site or make it unavailable.
- Removing configuration files could expose setup or installation functionality, depending on the application's behavior.
General mitigation guidance
Defensive approaches focus on keeping user-controlled values from determining filesystem paths. Prefer mapping validated identifiers to server-controlled filenames and directories, and enforce that resolved paths remain within an explicitly allowed storage location before performing deletion. Apply strict authorization checks for the target resource, minimize the application process's filesystem privileges, and avoid storing sensitive application files in locations writable by the web process.
How teams detect issues like this
- Review file-deletion code for paths assembled from request parameters, user identifiers, or other untrusted values.
- Use static analysis to flag filesystem operations whose paths include unvalidated input.
- Check that authorization is performed for the specific file being deleted and that canonicalized paths are confined to an approved directory.
- Apply policy checks that restrict deletion operations to designated storage areas, and monitor for unexpected deletion attempts or access to sensitive paths.

