/

CVE-2026-27177

Severity:

HIGH RISK

(7.2)

Stored XSS in MajorDoMo Property Handling

CVE-2026-27177

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Administrative Session Hijacking and Full Account Compromise via Stored XSS

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 exposes an unauthenticated endpoint that allows attacker-controlled property values to be stored in the database and later rendered as HTML/JavaScript in the admin interface without escaping.

When an administrator opens the property editor, the malicious content executes automatically, and because session cookies are not marked HttpOnly, this can lead to session hijacking and full admin takeover.

Affected context

The vulnerability appears in MajorDoMo's property handling for IoT device integration, specifically the /objects/?op=set endpoint and the admin panel property editor.

The system is designed so that /objects/?op=set is intentionally unauthenticated to accept updates from devices, and user-supplied property values are persisted directly to the database.

In affected setups, the admin panel's property editor page displays these values in both a paragraph tag (SOURCE field) and a textarea (VALUE field) without HTML escaping.

This behavior becomes risky when external networks, untrusted devices, or integrators can reach the unauthenticated endpoints or when the admin interface is used from browsers with active sessions.

Exploit preconditions

  • Attack surface:
  • Publicly or internally exposed /objects/?op=set endpoint for property updates
  • Accessible /api.php/data/ endpoint allowing property enumeration
  • Administrative web interface where properties are viewed
  • Required access:
  • Network-level access to the MajorDoMo instance (no authentication required for /objects/?op=set and /api.php/data/)
  • An administrator must later view the affected property in the admin panel while logged in
  • Trigger point:
  • Stored XSS fires automatically when the admin opens the property editor page, as the stored payload is rendered unescaped in the SOURCE and VALUE fields on page load
  • Why exploitation is possible:
  • Property values are accepted from unauthenticated sources and stored without validation or sanitization.
  • The admin UI reflects these values without HTML encoding.
  • The session cookie is not marked HttpOnly, enabling JavaScript access to document.cookie and subsequent session hijacking.

Why this happens

This issue is rooted in treating untrusted input as safe content during server-side rendering, consistent with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The /objects/?op=set endpoint persists user/device-supplied data directly to the database without applying an output-neutral format (e.g., proper HTML encoding) or any server-side sanitization.

When the admin property editor renders the SOURCE and VALUE fields in HTML, it inserts these raw values into a paragraph tag and a textarea element without escaping, allowing embedded scripts or event handlers to become part of the DOM and execute.

This is compounded by a session management weakness: session cookies lack the HttpOnly attribute, meaning that once arbitrary JavaScript is executing in the admin's browser, it can read and exfiltrate the session token, facilitating full account compromise.

Potential impact

  • An attacker may hijack administrator sessions by exfiltrating non-HttpOnly session cookies via JavaScript.
  • Malicious scripts can run with the admin's privileges, allowing configuration changes, new user creation, or disabling of security features.
  • Attackers could modify or delete IoT device properties, disrupt automation logic, or manipulate sensor readings and actuator commands.
  • Further attacks against the administrator's browser environment can occur, such as keylogging, phishing overlays, or browser-based pivoting to other internal systems.
  • Persistent XSS payloads may remain active until the affected property values are identified and cleaned, prolonging exposure.

General mitigation guidance

Effective mitigation focuses on strict separation between untrusted input and rendered HTML, hardening of unauthenticated interfaces, and robust session protection:

  • Output encoding by context:
  • Apply HTML entity encoding to all dynamic content before inserting it into the DOM, especially in the admin property editor.
  • Use templating engines or frameworks that auto-escape by default and treat any raw HTML insertion as an exception that requires explicit justification.
  • Input trust reduction:
  • Treat all data originating from /objects/?op=set and /api.php/data/ as untrusted, regardless of presumed device authenticity.
  • Optionally introduce allowlists or structured schemas for property values (e.g., numeric ranges, strings of limited length, or enumerated values) to prevent arbitrary markup.
  • Interface hardening:
  • Reconsider intentionally unauthenticated endpoints; where possible, use lightweight authentication (API keys, device tokens, or signed payloads) rather than fully open endpoints.
  • Segment device-update endpoints onto isolated network paths or interfaces not reachable from general user networks or the internet.
  • Session protection:
  • Configure session cookies to use security attributes (HttpOnly, Secure, and SameSite where appropriate) so that browser-executed scripts cannot access tokens.
  • Avoid exposing sensitive session identifiers in any client-readable storage.
  • Least privilege for admin operations:
  • Limit which admin roles can access sensitive configuration and property editing screens.
  • Encourage the use of separate, low-privilege accounts for routine monitoring and higher-privilege accounts for configuration tasks only when needed.

How teams detect issues like this

To identify and monitor this class of vulnerability, organizations can use a mix of code-centric and runtime strategies:

  • Static analysis and code scanning:
  • Configure static analysis tools or linters to flag direct insertion of untrusted variables into HTML templates without encoding, particularly in admin panel views related to properties.
  • Search for raw echo/print/render calls that combine HTML markup with unescaped dynamic values from request parameters or database fields associated with /objects/?op=set.
  • Security-focused code review:
  • During manual reviews, trace data flow from unauthenticated endpoints (/objects/?op=set, /api.php/data/) through the persistence layer into the admin templates.
  • Look for patterns where user/device input is stored and later displayed to privileged users without clear sanitization or encoding steps.
  • Dynamic testing / DAST:
  • Use application security testing tools to inject benign XSS test strings into properties via the unauthenticated endpoints and verify whether those strings appear unencoded when viewing the admin UI.
  • Incorporate these tests into CI/CD pipelines to catch regressions when templates or device integration logic change.
  • Runtime monitoring:
  • Enable server and application logging of property updates, especially from unusual IP ranges or user agents that do not resemble known IoT devices.
  • Use Content Security Policy (CSP) reporting where possible to detect blocked script execution attempts that may indicate attempted XSS.

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-property-set-endpoint

Frequently asked

questions

Yes, if the MajorDoMo instance exposes the unauthenticated /objects/?op=set and /api.php/data/ endpoints to the internet or to untrusted networks, an attacker can remotely inject malicious property values without any credentials. The XSS executes when an admin later loads the affected page in their browser.

No. The design of the integration endpoint allows unauthenticated property updates. The attacker only needs network access to the instance. The administrator's authenticated session is required only for the XSS payload to execute in a privileged context when they view the poisoned property.

The safest approach is to consistently apply context-aware output encoding for all user or device-controlled data in templates, restrict unauthenticated endpoints to carefully validated and typed inputs, and harden session cookies with HttpOnly (and other security attributes). Combining these patterns removes both the stored XSS vector and the ability for any residual scripts to harvest session tokens.

Adopt a secure-by-default view rendering strategy where templates auto-escape dynamic values, design integration endpoints assuming all external input is hostile, enforce strong data validation and encoding across trust boundaries, and treat session management as a critical security control. Integrating these rules into coding standards, automated testing, and code review checklists helps prevent reintroduction of stored XSS and related weaknesses.

Find out what's already
exploitable in your codebase.