Multi-Master Replication Manager for MySQL mmm_agentd Remote Command Injection Vulnerabilities
The mmm_agentd daemon in MySQL Master-Master Replication Manager (MMM) 2.2.1 does not sanitise role IP address values before using them in shell commands, allowing an unauthenticated network attacker to inject arbitrary commands. Because mmm_agentd typically runs as root, this can lead to remote command execution with root privileges.
Originally disclosed on Cisco Talos
Multiple exploitable remote command injection vulnerabilities exist in the MySQL Master-Master Replication Manager (MMM) mmmagentd daemon 2.2.1. mmmagentd commonly runs with root privileges and does not require authentication by default. A specially crafted MMM protocol message can cause a shell command injection…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the daemon fails to validate or escape role IP address values before interpolating them into shell command strings, and helper functions also pass unsanitised values to shell commands.
Impact
An unauthenticated network attacker who can reach mmm_agentd could execute arbitrary commands with the privileges of the mmm_agentd process, which is typically root.
What the attacker needed
Network access to mmm_agentd TCP port; mmm_agentd running with default no-auth config; mmm_agentd typically runs as root
The fix
The report recommends sanitising all dynamic values incorporated into shell commands and modifying _execute() to use discrete arguments or execv-like functionality to avoid shell interpretation; the vendor confirmed a patch.
How it was found
- Connect to the mmm_agentd TCP port (no authentication required by default).
- Send a crafted MMM protocol message such as SET_STATUS that includes a role with a malicious IP address value.
- The daemon parses the role and later invokes helper functions like configure_ip or clear_ip with the malicious IP.
- Those helpers pass the IP to _execute(), which runs a shell command containing the unsanitised value, executing the injected command.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The mmm_agentd program runs on database servers and accepts network messages that include IP addresses. It passes those addresses directly into system commands without checking them, so an attacker can include extra shell instructions. Since the program usually runs as root, the attacker can run any command on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.