WWBN AVideo has Multiple CSRF Vulnerabilities in Admin JSON Endpoints (Category CRUD, Plugin Update Script)
Date: 2026-04
Affected: composer/wwbn/avideo
Attack vector: xss
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-40926
CWE: CWE-352
CVSS: 7.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L)

## Summary Three admin-only JSON endpoints — `objects/categoryAddNew.json.php`, `objects/categoryDelete.json.php`, and `objects/pluginRunUpdateScript.json.php` — enforce only a role check (`Category::canCreateCategory()` / `User::isAdmin()`) and perform state-changing actions against the database without calling `isGlobalTokenValid()` or `forbidIfIsUntrustedRequest()`. Peer endpoints in the same directory (`pluginSwitch.json.php`, `pluginRunDatabaseScript.json.php`) do enforce the CSRF token, so the missing checks are an omission rather than a design choice. An attacker who lures a logged-in admin to a malicious page can create, update, or delete categories and force execution of any installed plugin's `updateScript()` method in the admin's session. ## Details AVideo's CSRF defense is not applied globally — each endpoint must explicitly call `isGlobalTokenValid()` (defined in `objects/functions.php:2313`), which verifies `$_REQUEST['globalToken']`. A search across the codebase shows 18 files that correctly invoke `forbidIfIsUntrustedRequest()` or `isGlobalTokenValid()`, while the three endpoints below do not. ### 1. `objects/categoryAddNew.json.php:18` — CSRF create/overwrite category ```php 18 if (!Category::canCreateCategory()) { 19 $obj->msg = __("Permission denied"); 20 die(json_encode($obj)); 21 } 22 23 $objCat = new Category(intval(@$_POST['id'])); 24 $objCat->setName($_POST['name']); 25 $objCat->setClean_name($_POST['clean_name']); 26 $objCat->set


Mitigations:

Architectural layers (MAESTRO):