Unauthenticated RCE in Anti-Malware Security and Brute-Force Firewall GOTMLS WordPress Plugin CVE-2024-22144
The GOTMLS WordPress plugin exposed unauthenticated API functions that leaked server time and allowed brute-forcing a weak nonce. With a valid nonce, an attacker could inject malicious malware regex rules that selectively deleted plugin source code, leaving behind an eval backdoor for remote code execution.
sec.stealthcopter.com
Published on sec.stealthcopter.com
The Anti-Malware Security and Brute-Force Firewall GOTMLS WordPress Plugin is vulnerable to Unauthenticated Remote Code Execution (RCE) by chaining multiple vulnerabilities including unprotected API access, insufficient randomness, insecure design and improper sanitization of data. Final remote code execution was…
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the plugin used predictable inputs to generate nonces, exposed sensitive API functions without authentication, and allowed user-supplied regex rules to modify its own source code.
Impact
An unauthenticated attacker could achieve remote code execution, potentially taking full control of the WordPress site.
What the attacker needed
Target runs vulnerable GOTMLS plugin (<=4.21.96); No authentication required; Network access to the WordPress site
How it was found
- Access the logintime function to obtain the server's microtime.
- Calculate the installation key from the site URL and plugin path.
- Brute force a valid nonce using the leaked microtime and predictable inputs.
- Use the nonce to call the load_update function and inject malicious malware regex rules.
- Trigger a scan on a specific file to cause selective deletion of code, leaving an eval backdoor.
- Send PHP code to the backdoor via the mt parameter to execute arbitrary commands.
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 write-up has not been written yet. The Original tab links to the source.
A WordPress plugin had several security holes that, when combined, let an attacker run commands on the server without logging in. The attacker could guess a secret code because it was made from predictable information, then use that access to change the plugin's malware detection rules so they deleted parts of the plugin's own code, leaving a backdoor. This backdoor allowed executing any PHP code sent to 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.