Manage Engine OpManager Multiple Authenticated RCE Vulnerabilities
Two authenticated remote code execution vulnerabilities existed in ManageEngine OpManager: the testNewScriptTemplate API allowed arbitrary command execution, and the uploadMib API allowed path traversal to overwrite files as root. An attacker with valid credentials could execute commands and gain root access.
Published on pulsesecurity.co.nz
Pulse Security has identified two vulnerabilities in the ManageEngine OpManager software currently being exploited in the wild, and one observational note. This document details the vulnerabilities and the indicators of compromise that may be used to identify these exploits.
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 testNewScriptTemplate API intentionally executes scripts without restricting the command, and the uploadMib endpoint fails to sanitise the uploaded filename, allowing directory traversal.
Impact
An authenticated attacker could execute arbitrary commands as root on the OpManager host, and because OpManager stores credentials in reversible encryption, further environment compromise is likely.
What the attacker needed
Valid OpManager credentials or API key; network access to the OpManager API
The fix
ManageEngine released patch 123160 that allegedly fixes these issues; users should also change default passwords and remove or disable default accounts.
How it was found
- Obtain a valid API key for an OpManager account.
- Set the target device type to a non-null value using the UpdateDeviceDetails API.
- Send a request to the testNewScriptTemplate API with a command in the commandLine or scriptBody parameter.
- Observe the command output in the response, confirming execution as root.
- Alternatively, upload a file via the uploadMib API using a path traversal filename to overwrite a file such as a cron job.
- Wait for the cron job to execute and connect to the resulting bind shell.
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.
OpManager is software for monitoring networks. Two of its features let a logged-in user run commands or upload files, but they did not check what was being run or where files were saved. Someone with a valid login could abuse these features to take full control of 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.