Hardening Helix Ultimate Mega-Menus Against Stored XSS Attacks

Stored XSS in JoomShaper Helix Ultimate Mega-Menus: How It Happens and How to Fix It
JoomShaper's Helix Ultimate framework powers thousands of Joomla production sites across Europe and North America. Its built-in mega-menu generator lets site administrators and content managers build multi-column navigation layouts, inject module instances into dropdowns, and attach custom CSS classes or badges through the standard Joomla menu item interface. That flexibility is powerful — but when dynamic menu fields or custom title attributes are rendered without strict output sanitization, Helix Ultimate mega-menus can become a vector for stored Cross-Site Scripting (XSS).
In this guide
- Understanding stored XSS in the render pipeline
- Impact of front-end DOM compromise
- Auditing and fixing your mega-menu overrides
- Content Security Policy as defense in depth
- Automating threat detection across your stack
- Action checklist for site administrators
Status: Patched
This is already fixed upstream. It's tracked as CVE-2026-78077 (unsanitized MegaMenu layout container and embed inputs) and was resolved in Helix Ultimate 2.2.10 (August 27, 2026). A related, broader issue in the AJAX handler — an unauthenticated stored XSS via menu settings, CVE-2026-57829 — was fixed earlier in 2.2.7 (July 7, 2026). Joomla 3.x sites get the same hardening via the separate j3-security-v1.0.2 GitHub release. If you're on anything older, update now.
Understanding Stored XSS in the Render Pipeline
Stored (or persistent) XSS occurs when malicious input submitted to an application is saved to the database and later rendered to other users without sufficient encoding. In Joomla template frameworks, custom menu parameters are stored as JSON in the #__menu table's params column — a verified mechanism: that column holds arbitrary JSON text, and a JavaScript payload placed into a mega-menu field is stored there just like any other parameter value.
When a visitor requests a page, the menu system pulls these parameters and runs them through the template's menu parser — typically found in templates/shaper_helixultimate/html/mod_menu/ or the framework library at plugins/system/helixultimate/overrides/mod_menu/. If an attribute such as a menu badge, subtitle, or custom icon class is written directly into the HTML with a plain PHP echo rather than passed through Joomla's output-filtering API, any JavaScript embedded in that field executes in the browser of every visitor who loads the navigation bar.
What a Vulnerable Override Looks Like
// Vulnerable implementation in a menu override
$badgeText = $item->params->get('helix_badge_text');
if (!empty($badgeText)) {
echo '<span class="menu-badge">' . $badgeText . '</span>';
}
If a lower-privileged account — a Manager or Content Editor, for instance — or an attacker who has gained access to any backend session capable of editing menu items enters a script payload into the badge field, that payload is written straight into the page's HTML on every subsequent load. Because navigation menus render site-wide, a single stored payload can affect every visitor, including Super Users browsing the front end while logged in.
Impact of Front-End DOM Compromise
Script execution inside an authenticated Joomla session gives an attacker a foothold to bypass normal access controls. Realistic post-exploitation outcomes include:
Session hijacking & token theft
Capturing live CSRF tokens and administrative session cookies.
Silent privilege escalation
Firing background requests against Joomla's backend endpoints to attempt creation of a new Super User account.
Malicious redirects
Injecting script that redirects visitors, mobile users, or search crawlers to phishing pages.
The severity here comes from where the vulnerable code sits: navigation menus are rendered on essentially every page, so the blast radius of one unescaped field is the entire site.
Auditing and Fixing Your Mega-Menu Overrides
The fix is straightforward: treat every value pulled from menu parameters as untrusted, and encode it before it touches the page.
Step 1 — Escape dynamic output before rendering
Run any user-controllable string through htmlspecialchars() before echoing it into a layout file:
// Secure implementation using htmlspecialchars
$badgeText = $item->params->get('helix_badge_text');
if (!empty($badgeText)) {
echo '<span class="menu-badge">' . htmlspecialchars($badgeText, ENT_QUOTES, 'UTF-8') . '</span>';
}
ENT_QUOTES ensures both single and double quotes are encoded, which matters if the value is ever placed inside an HTML attribute rather than just element content.
Step 2 — Validate custom icon and CSS classes
Helix Ultimate also allows custom FontAwesome or Bootstrap icon classes on menu items. Because these are typically echoed straight into a class attribute, injected quotes or angle brackets can break out of the attribute. Whitelist the allowed character set instead of blacklisting dangerous ones:
// Secure class assignment using a whitelist filter
$rawIcon = $item->params->get('helix_icon');
$cleanIcon = preg_replace('/[^a-zA-Z0-9\-_ ]/', '', $rawIcon);
if (!empty($cleanIcon)) {
echo '<i class="' . $cleanIcon . '"></i>';
}
Content Security Policy as Defense in Depth
Output escaping should be your primary fix, but a strict Content Security Policy is a good second layer — it limits what an attacker can do even if an unescaped field slips through somewhere you haven't audited yet. Add something like this to your .htaccess or server block:
Header set Content-Security-Policy "default-src 'self'; script-src 'self' https://trustedscripts.example.com; style-src 'self' 'unsafe-inline';"
By excluding 'unsafe-inline' from script-src, browsers will refuse to execute inline <script> tags injected via menu parameters, even if a vulnerable override still exists somewhere in the template.
Automating Threat Detection Across Your Joomla Stack
Auditing manual template overrides across multiple Joomla client sites doesn't scale well by hand. Beyond template-level XSS risks, sites running extensions like SP Page Builder or JCE Editor need continuous monitoring for unauthorized file uploads, altered core files, and webshell signatures. Whatever scanner you choose, vet it the same way you'd vet a plugin: check maintenance activity, read the source if it's open, and confirm it actually checks for the specific issues above rather than just flagging outdated version strings.
One option built around this exact class of Joomla compromise is MuRu Guard, a free, open-source scanner and companion protection plugin. The following is drawn from the vendor's own product documentation — treat it as a description of what it's designed to do, not an independently benchmarked claim.
Database & menu checks
Scans #__menu specifically for Helix Ultimate mega-menu XSS injections — the exact storage location this article describes — alongside #__sppagebuilder_assets and #__template_styles.
Core-file checksum verification
Compares core files byte-for-byte against the official joomla/joomla-cms release hash, independent of pattern-based checks.
Real-time request protection
An optional companion plugin inspects every request as it happens and can log or actively block high-confidence attack patterns.
Guided, scoped cleanup
Menu-item cleaning strips only known injection markers from a menu item's params JSON, field by field, rather than deleting the whole item.
Access model
Per the vendor, there's no separate login or API key — access is governed entirely by Joomla's existing user, session, and ACL system, and every state-changing action requires a standard Joomla CSRF token.
The free tier is described as covering full scanning, cleanup, and real-time protection without restriction; a paid Pro tier reportedly adds file integrity monitoring, an active web application firewall, and fleet-wide monitoring for agencies managing multiple sites.
Action Checklist for Site Administrators
Quick reference
- Update Joomla 4/5/6 sites to Helix Ultimate 2.2.10+; Joomla 3.x sites need j3-security-v1.0.2 from GitHub, installed manually.
- Audit
templates/YOUR_TEMPLATE/html/mod_menu/for any unescapedecho $item->params->get(...)call. - Apply least privilege — content editors shouldn't need menu manager or raw parameter access.
- Add a strict Content-Security-Policy header as a second layer of defense.
- Schedule regular file-integrity and database scans so injections are caught early.
Stored XSS bugs like this are rarely exotic — they come from a single unescaped echo in a template override. Treat any user- or admin-supplied string as untrusted the moment it's about to hit the page, and this entire class of bug goes away.
MuRu Guard
Free, open-source Joomla security scanner with a Helix Ultimate–specific mega-menu check.
Comments (0)
No comments yet. Be the first to comment!

