/

CVE-2026-27178

Severity:

HIGH RISK

(7.2)

Stored XSS in MajorDoMo Shoutbox Method Handling

CVE-2026-27178

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Authenticated session compromise via stored XSS in dashboard shoutbox

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MajorDoMo's shoutbox feature is vulnerable to stored cross-site scripting (XSS) because user-controlled method parameters are written directly into the shouts database table and later rendered without sanitization.

An unauthenticated attacker can inject script content that will automatically execute in an administrator's browser when the dashboard auto-refreshes, potentially enabling session hijacking via cookie theft.

Affected context

This vulnerability appears in MajorDoMo installations where:

  • The /objects/?method= endpoint is exposed and callable without authentication
  • Built-in methods such as ThisComputer.VolumeLevelChanged accept user-controlled parameters like VALUE
  • The say() function stores these parameters directly into the shouts table without escaping or encoding
  • The shoutbox widget is enabled on administration or monitoring dashboards and refreshes periodically in a logged-in browser

In such deployments, stored, attacker-supplied HTML/JavaScript added to the shoutbox will be rendered back to any user viewing the dashboard, including privileged administrators.

Exploit preconditions

  • Attack surface: HTTP endpoint at /objects/?method= reachable over the network
  • Required access: No authentication required if the endpoint is publicly accessible; attacker only needs network reachability to the MajorDoMo instance
  • Trigger point: An administrator (or other authenticated user) loads a dashboard page containing the shoutbox widget, which auto-refreshes approximately every 3 seconds
  • Why exploitation is possible:
  • The VALUE parameter is attacker-controlled and is passed into a method that calls say()
  • say() persists the message directly into the shouts database table without escaping or sanitization
  • The shoutbox rendering logic and templates output stored messages as raw HTML, with no encoding
  • The auto-refresh mechanism continuously fetches and renders newly stored messages, executing any embedded scripts in the victim's browser

Why this happens

The underlying issue maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

MajorDoMo treats method parameters as trusted content and:

  1. Accepts arbitrary user input via the /objects/?method= endpoint, including for default methods like ThisComputer.VolumeLevelChanged.
  2. Passes the VALUE parameter directly into the say() function, which stores it verbatim in the shouts table.
  3. Renders shoutbox entries back to clients without applying contextual output encoding (e.g., HTML entity encoding in templates, JavaScript escaping, or attribute encoding).

This design conflates untrusted external input with trusted system messages and fails to enforce any output encoding at the final rendering point. The combination of unsanitized storage plus unsanitized rendering results in persistent XSS that triggers in any user's browser who views the shoutbox, especially administrators reviewing the auto-refreshing dashboard.

Potential impact

  • An attacker can execute arbitrary JavaScript in the context of an administrator's session.
  • Administrator session cookies (if not protected by HttpOnly flags) could be exfiltrated, enabling session hijacking.
  • Attackers may perform actions on behalf of the administrator, such as changing configurations, adding backdoors, or managing devices through the MajorDoMo interface.
  • Malicious scripts can modify the dashboard UI, hide indicators of compromise, or trick users into performing sensitive actions (UI redressing / phishing-like attacks).
  • Stored payloads could be used as a pivot to attack other integrated systems exposed in the same browser context (e.g., if the dashboard embeds other admin panels).

General mitigation guidance

Effective mitigation generally focuses on treating all externally influenced content as untrusted and applying contextual output encoding at every render point, alongside narrowing what data can be injected through method parameters.

Recommended defensive patterns include:

  • Output encoding by default:
  • Apply HTML entity encoding to shout text before inserting it into templates or echoing it in PHP.
  • Use framework helpers (or well-tested template engines) that encode variables for HTML, attributes, and JavaScript contexts automatically.
  • Separate data from presentation:
  • Store only plain text (not HTML/JS) for shouts.
  • If formatting is required, limit it to a safe subset (e.g., markdown or BBCode) and use a robust sanitizer or whitelist-based renderer.
  • Constrain method parameters:
  • Treat parameters passed via /objects/?method= as untrusted, even for built-in methods.
  • Introduce strict validation for parameters like VALUE (length, allowed characters, disallowing <, >, quotes, etc., where appropriate).
  • Consider explicit schemas or type constraints for method parameters instead of generic free-form strings.
  • Apply least privilege and trust boundaries:
  • Limit which methods are callable via the public /objects/?method= endpoint.
  • Require authentication or authorization for methods that affect user-visible messages or administrative dashboards.
  • Safe-by-default widgets:
  • Ensure dashboard widgets, especially those that auto-refresh, render all external or user-originated text using safe, encoded output routines.

How teams detect issues like this

Detection typically involves combining code-level inspection with runtime behavior analysis:

  • Static analysis patterns:
  • Search for calls to echo/print or template variable output that use values read directly from the database shouts table or from say() outputs without any escaping or encoding functions.
  • Identify usage of /objects/?method= handlers where user-supplied parameters (such as $_GET['VALUE'], $_REQUEST, etc.) flow into persistent storage and then into view templates.
  • Configure static analyzers or linters with rules to flag unescaped variables in HTML/JS output contexts.
  • Code review signals:
  • Endpoints that accept arbitrary text and forward it to message/logging or notification systems without sanitization.
  • Widgets or pages that auto-refresh or poll APIs and render JSON/HTML payloads directly into the DOM.
  • Central utility functions (like say()) that both store and present user-visible text but lack a clear strategy for encoding.
  • Runtime and operational indicators:
  • Browser security console warnings on admin dashboards that show inline script execution or suspicious DOM injections.
  • Web application firewall (WAF) or reverse proxy logs containing suspicious HTML/JS sequences in query parameters or shout content.
  • Security scanning tools (DAST) or browser-based scanners reporting persistent/reflected XSS in shoutbox or dashboard routes.

Organizations may choose to integrate automated SAST/DAST tools into CI pipelines to detect unencoded output patterns in PHP templates and to scan the running application for persistent XSS vectors.

Sources

SourceLink
chocapikk.comchocapikk.com/posts/2026/majordomo-revisited/
github.comgithub.com/sergejey/majordomo/pull/1177
vulncheck.comvulncheck.com/advisories/majordomo-stored-cross-site-scripting-via-method-parameters-to-shoutbox

Frequently asked

questions

Exploitation is straightforward when the /objects/?method= endpoint is reachable without authentication. An attacker can issue a crafted request that uses a default method like ThisComputer.VolumeLevelChanged to inject a script payload into the shoutbox. Once an administrator loads a dashboard with the shoutbox widget, the payload executes automatically due to the auto-refresh behavior.

Not necessarily. The description indicates that the vulnerable endpoint allows unauthenticated execution of certain methods with attacker-controlled parameters. As long as the endpoint is exposed and the shoutbox widget is used by authenticated administrators, an external attacker may be able to trigger stored XSS without any prior login.

Adopt a defense-in-depth approach:

  • Ensure all shoutbox and similar user-visible content is encoded for the appropriate context at render time.
  • Restrict which methods are callable via /objects/?method= and require authentication/authorization for those that update UI-facing data.
  • Centralize output encoding (e.g., via templating helpers) so it is difficult to bypass accidentally.

Define a clear policy that all user-influenced content is treated as untrusted and must pass through validation and contextual output encoding before hitting the UI. Use secure template engines that encode values by default, avoid directly embedding untrusted data into HTML/JavaScript, and review any "generic method execution" or "logging/message" utilities to ensure they cannot be abused to store and render arbitrary script content. Regular security testing (including XSS-focused code reviews and automated scanning) can help catch regressions early.

Find out what's already
exploitable in your codebase.