Summary
WWBN AVideo up to and including version 26.0 exposes an unauthenticated APIName=locale endpoint that concatenates user-controlled input directly into a PHP include path without canonicalization or whitelisting.
This allows attackers to traverse directories under the web root and include arbitrary existing PHP files, leading to sensitive file disclosure and execution of those scripts, and it can escalate to full remote code execution if an attacker can place or control a PHP file in the application tree.
Affected context
This vulnerability occurs in WWBN AVideo deployments (≤ 26.0) where the APIName=locale API endpoint is reachable over the network without authentication.
The endpoint builds an include path from user input and accepts path traversal sequences while operating within the web root.
The risk is higher on instances where additional upload mechanisms, plugins, or deployment tooling can introduce writable locations for PHP files or otherwise expand the set of includable scripts.
Exploit preconditions
- Attack surface: Publicly exposed HTTP(S) API endpoint
APIName=locale, typically under the main AVideo web application. - Required access: No authentication is required; an attacker only needs network access to the AVideo instance.
- Trigger point: A crafted request supplying a path traversal payload as the locale-related parameter that is concatenated into the
includestatement. - Why exploitation is possible:
- User input is inserted directly into a filesystem path used by
include, without canonicalization (e.g., resolving../) or path validation. - No strict whitelist or mapping is enforced for allowable locale files.
- PHP
includeexecutes the targeted PHP file in the context of the running application, allowing both information disclosure and code execution of existing scripts, and potentially RCE if attacker-controlled PHP is reachable.
Why this happens
The root cause is the direct use of untrusted user input to construct a server-side file inclusion path.
The APIName=locale endpoint apparently treats a user-supplied value as a relative file path and concatenates it into an include call without normalization, whitelist enforcement, or restriction to a fixed directory.
This design flaw embodies:
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), because attackers can escape the intended directory using traversal sequences and access arbitrary PHP files under the web root.
- CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program, because the filename for
includeis influenced by untrusted data, allowing attackers to choose which script the server executes.
Abstractly, the insecure pattern is "user-controlled file paths driving dynamic include/require," where the application relies on naming conventions rather than explicit validation or mapping.
Potential impact
- Disclosure of PHP source code for application files under the web root, subject to server configuration.
- Execution of existing PHP scripts in unintended contexts, which may reveal configuration details or bypass normal routing and checks.
- Leveraging included PHP files to perform actions with the application's privileges, depending on what the targeted script does when executed this way.
- Escalation to remote code execution if an attacker can upload, plant, or otherwise control a PHP file anywhere under the includable path tree.
- Further compromise of the underlying system or connected services if RCE is achieved (e.g., database access, lateral movement).
General mitigation guidance
Effective mitigation focuses on removing user control over include paths and constraining file access:
- Replace dynamic includes based on raw request parameters with an internal mapping from allowed locale identifiers to concrete filenames; reject any value not in the mapping.
- Enforce strict directory constraints by building include paths from a fixed, constant base directory and validating that the resolved path remains within that directory.
- Canonicalize and normalize any path-like input before use, explicitly rejecting traversal tokens such as
../, absolute paths, or null bytes. - Treat locale or template identifiers as opaque tokens (e.g.,
en_US,fr_FR) and never as path fragments; store the mapping server-side. - Where dynamic inclusion cannot be avoided, prefer data-driven resource formats (JSON, PO/MO files, etc.) instead of executable PHP files.
- Apply least-privilege principles for the web server and PHP process to limit the blast radius if a file inclusion flaw is abused.
How teams detect issues like this
Detection can combine code-level review and runtime observation:
- Static analysis and code review:
- Search for
include,require,include_once, andrequire_oncethat concatenate or directly use$_GET,$_POST, or other request-sourced data. - Flag any use of user-controlled variables in file paths without prior mapping to an allowlist or normalization logic.
- Review API handlers for locale, template, or theme selection features that look up files based on free-form parameters.
- Automated tooling:
- Configure SAST tools with rules for PHP file inclusion sinks and path traversal patterns.
- Use linters or custom CI checks to ban dynamic includes from untrusted sources.
- Runtime and operational monitoring:
- Inspect web server and PHP logs for suspicious requests containing
../or unusual path fragments in locale or file parameters. - Employ web application firewalls (WAF) with rules targeting traversal sequences and anomalous include-like patterns, while recognizing that WAFs are a supplementary control, not a fix.

