/

CVE-2026-27179

Severity:

HIGH RISK

(8.2)

SQL Injection in MajorDoMo Commands Module

CVE-2026-27179

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthenticated Database Compromise and Account Takeover

Severity:

HIGH RISK

(8.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 commands module suffers from an unauthenticated SQL injection vulnerability where the parent HTTP parameter is directly interpolated into database queries without sanitization or parameterization.

An attacker can exploit this via a time-based blind SQL injection on the /objects/?module=commands endpoint to extract data such as admin credential hashes and then leverage them for administrative access.

Affected context

This vulnerability appears in the MajorDoMo home automation platform within the commands module, specifically in commands_search.inc.php.

The issue is present when:

  • The /objects/?module=commands endpoint is reachable over the network
  • Module loading does not enforce authentication for the commands module
  • SQL queries are constructed by concatenating the $_GET['parent'] parameter into query strings

In this configuration, the application exposes a database-backed search capability that can be manipulated through crafted URL parameters.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint /objects/?module=commands
  • Required access: No prior authentication; attacker only needs network access to the MajorDoMo web interface
  • Input vector: parent query parameter in requests to commands_search.inc.php
  • Trigger point: SQL query construction in the commands search logic, where $_GET['parent'] is interpolated directly into SQL statements
  • Why exploitation is possible: User-controlled data is concatenated into SQL queries without escaping or prepared statements, enabling time-based blind injection via patterns such as UNION SELECT SLEEP(...)

Why this happens

The root cause maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The commands_search.inc.php script uses string concatenation to build SQL queries, inserting the $_GET['parent'] parameter directly into the WHERE clause and other parts of the query.

Because this value is not validated, escaped, or bound as a parameter, an attacker can alter the logic of the underlying SQL query.

The unauthenticated module loading behavior of /objects/?module=commands further broadens exposure by making the vulnerable code executable without any login barrier.

Potential impact

  • Extraction of arbitrary data from the database, including entries from the users table
  • Exposure of admin account credentials stored as unsalted MD5 hashes
  • Offline cracking of MD5 password hashes and subsequent admin panel login
  • Tampering with configuration or automation rules stored in the database
  • Potential pivoting to underlying host or network if administrative functions are abused

General mitigation guidance

Effective mitigation focuses on securing both query construction and module exposure:

  • Replace string-concatenated SQL with parameterized queries or prepared statements for all user-supplied fields, including parent
  • Apply strict input validation and normalization on query parameters, especially those used for filtering or identification
  • Enforce authentication and authorization checks for the commands module and similar system-level modules
  • Avoid storing passwords as unsalted MD5 hashes; instead, use modern password hashing functions with salt and work factor
  • Implement a defense-in-depth model where database accounts used by the application have only the minimal privileges required

How teams detect issues like this

Organizations can identify and monitor this class of vulnerability through:

  • Static application security testing (SAST) rules that flag raw $_GET usage in SQL string concatenations
  • Manual code reviews that look for dynamic SQL patterns and module entry points exposed without authentication
  • Web application firewall (WAF) rules tuned to detect common SQL injection patterns, including time-based payloads
  • Database monitoring and anomaly detection for unusual query patterns, such as repeated SLEEP calls or UNION-based probes
  • CI/CD pipeline checks that prevent merging code where HTTP parameters flow directly into SQL queries without parameterization

Sources

SourceLink
chocapikk.comchocapikk.com/posts/2026/majordomo-revisited/
github.comgithub.com/sergejey/majordomo/pull/1177
vulncheck.comvulncheck.com/advisories/majordomo-unauthenticated-sql-injection-in-commands-module

Frequently asked

questions

Yes, if the MajorDoMo interface is exposed to the internet or an untrusted network and the /objects/?module=commands endpoint is reachable, an attacker can exploit the issue remotely without any login.

No. The vulnerable commands module can be loaded without authentication, so an attacker only needs network access to the web interface to begin attempting SQL injection.

Refactor all affected queries to use prepared statements or parameterized queries, ensure that the parent parameter is type-checked and validated, and restrict access to high-privilege modules like commands behind proper authentication and authorization.

Adopt a standard data access layer that enforces parameterized queries by default, prohibit direct concatenation of user input into SQL, introduce secure coding guidelines with code review checklists, and integrate automated security testing into the development pipeline.

Find out what's already
exploitable in your codebase.