Summary
WWBN AVideo contains a path traversal vulnerability in the API get_api_login_code endpoint. An unauthenticated attacker may manipulate the code parameter to delete arbitrary .log files and infer whether files exist on the server when the endpoint processes attacker-controlled path data.
Affected context
The vulnerability occurs in deployments where the get_api_login_code API endpoint accepts a user-controlled code value and uses it to construct or resolve filesystem paths. Risk increases when the endpoint is publicly reachable and path handling does not constrain access to the intended logging or temporary-file directory.
Exploit preconditions
- Attack surface: The AVideo
get_api_login_codeAPI endpoint - Required access: No authentication may be required if the endpoint is exposed publicly
- Trigger point: Processing of the attacker-controlled
codeparameter - Why exploitation is possible: Directory components in the supplied value may influence filesystem path resolution, allowing access beyond the intended directory and producing observable file-handling behavior
Why this happens
The underlying bug is insufficient validation and normalization of externally controlled path input. When a request parameter is used to construct a filesystem path without enforcing a trusted base directory and rejecting traversal components, an attacker may cause the application to resolve a location outside its intended scope. This maps to CWE-73: External Control of File Name or Path.
Potential impact
- Attackers may delete application or audit log files
- Security investigations and forensic timelines could be impaired
- The application may disclose whether selected filesystem paths exist
- Operational troubleshooting and monitoring may be disrupted
- Repeated deletion requests could contribute to denial of service or evidence destruction
General mitigation guidance
Mitigation generally focuses on removing direct filesystem influence from unauthenticated request parameters and enforcing safe path resolution.
Common defensive patterns include:
- Use server-generated identifiers or opaque references instead of accepting path-like values from clients
- Resolve paths against a fixed, trusted directory and verify that the resulting canonical path remains within that directory
- Reject traversal components, absolute paths, unexpected separators, and encoded variants before filesystem access
- Apply strict allowlist validation for the expected format of the
codevalue - Separate log-management functions from public API routes and require appropriate authorization
- Run the application with the least filesystem permissions necessary
- Store audit logs in append-oriented or externally managed systems where practical
- Return uniform responses that do not reveal filesystem existence
How teams detect issues like this
High-level detection approaches include:
- Static analysis for request parameters reaching file deletion, file existence checks, or path-joining functions
- Code review for filesystem paths derived from query parameters or other unauthenticated input
- Tests covering canonicalization, encoded traversal variants, absolute paths, and symlink behavior
- Runtime monitoring for unusual deletion activity or repeated requests to the affected endpoint
- Web application firewall or API policy rules that reject unexpected path syntax in identifier fields
- Automated security scanning and code-review tools that identify external control of file names and paths

