/

CVE-2026-33681

Severity:

HIGH RISK

(7.2)

Path Traversal / File System Access Control in WWBN AVideo

CVE-2026-33681

Analyzed

Vulnerability type

Category:

Path Traversal / File System Access Control

CWE:

CWE-22

Impact:

Arbitrary SQL Execution via Filesystem Path Traversal

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WWBN AVideo up to version 26.0 contains a path traversal flaw in the pluginRunDatabaseScript.json.php endpoint, where a POSTed name parameter is used to locate SQL installation files without proper sanitization.

An authenticated admin, or an attacker leveraging CSRF, can traverse outside the plugin directory and execute arbitrary install/install.sql files on the server as raw database queries, potentially leading to data compromise or application takeover.

Affected context

This vulnerability occurs in WWBN AVideo deployments where:

  • The objects/pluginRunDatabaseScript.json.php endpoint is reachable over HTTP(S)
  • Plugins or core components rely on Plugin::getDatabaseFileName() to resolve SQL installation scripts
  • The name parameter from POST requests is treated as a filesystem path segment without strict validation

It primarily affects administrative workflows for running plugin database migration scripts, but can be abused outside normal plugin boundaries when path traversal is possible.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint objects/pluginRunDatabaseScript.json.php
  • Required access:
  • Valid authenticated admin session, or
  • A logged-in admin targeted with a crafted CSRF request if CSRF protections are weak or missing
  • Trigger point: Sending a POST request with a crafted name value containing path traversal sequences that resolve to an install/install.sql file outside the intended plugin directory
  • Why exploitation is possible: The name parameter is passed directly to Plugin::getDatabaseFileName() without normalizing, constraining, or validating the resulting path to a safe base directory, allowing attackers to reference SQL scripts in arbitrary locations that the application will then execute against the database.

Why this happens

The root cause is insufficient validation of user-controlled path input used to construct filesystem paths to SQL installation scripts.

By trusting the name parameter and not enforcing that the resolved path remains within the expected plugin directory, the code permits directory traversal (../) and similar patterns to escape the intended scope.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where path construction logic fails to restrict access to a safe base directory and allows unintended file access and, in this case, execution of the file contents as SQL queries.

Potential impact

  • Execution of arbitrary SQL statements contained in reachable install/install.sql files
  • Unauthorized schema changes, such as adding, dropping, or altering tables
  • Insertion, modification, or deletion of application data, including user accounts and permissions
  • Escalation of privileges within the application through manipulated database records
  • Indirect compromise of application integrity and availability, including potential data loss

General mitigation guidance

Mitigation should focus on constraining filesystem access and decoupling trust in file-based SQL scripts:

  • Enforce path normalization and validation so that any resolved path derived from name remains inside a predefined plugin directory and cannot include .. or other traversal constructs.
  • Use whitelisting or mapping: treat name as a logical plugin identifier and resolve it via an internal registry or lookup table, not as a raw path fragment.
  • Ensure that only known, explicitly allowed SQL install scripts can be executed, and avoid generic "run any install.sql file" patterns.
  • Restrict file system permissions so the web process can only read migration scripts from controlled directories, limiting the blast radius if path checks fail.
  • Apply least-privilege principles to the database account used by the application, reducing the scope of damage possible from unintended SQL execution.

How teams detect issues like this

Effective detection combines code-centric and operational approaches:

  • Static analysis: Flag uses of user-controlled variables in filesystem path construction, especially where the result is passed to file APIs or database execution routines without normalization and directory checks.
  • Code review signals: Look for:
  • Direct concatenation of request parameters into paths (e.g., $baseDir . $_POST['name'])
  • Lack of checks for .., absolute paths, or null bytes
  • Generic logic that executes the contents of files as SQL without strong contextual checks
  • Logging and monitoring:
  • Log invocations of pluginRunDatabaseScript.json.php including normalized target paths (without logging sensitive data).
  • Monitor for unusual or repeated attempts to reference unexpected directories via the name parameter.
  • Security testing: Use focused dynamic testing to probe path traversal patterns in endpoints that load or execute migration or installation scripts.
  • Automated code review or SAST tools can be configured to flag path traversal patterns and dangerous combinations of file access plus SQL execution.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/81b591c509835505cb9f298aa1162ac64c4152cb
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-3hwv-x8g3-9qpr

Frequently asked

questions

Yes, if the AVideo admin interface is exposed and reachable, the vulnerable endpoint can be accessed remotely. However, the attacker typically needs an authenticated admin session or the ability to perform CSRF against an authenticated admin.

The vulnerability requires an authenticated administrative user, or a situation where an attacker can induce an admin to visit a malicious page that triggers a crafted POST request (CSRF), assuming insufficient CSRF protections.

Treat the name parameter as a logical identifier rather than a raw path, resolve it through a trusted mapping inside the application, and enforce that any computed path is normalized and constrained to the intended plugin directory before reading or executing any SQL files.

Adopt strict input validation and canonicalization for any user-influenced paths, enforce directory whitelisting, perform regular security code reviews focusing on file and database interaction boundaries, and use static analysis rules to automatically flag instances where user input flows into filesystem paths or database execution contexts without proper checks.

Find out what's already
exploitable in your codebase.