OMIGOD: Critical Vulnerabilities in OMI Affecting Countless Azure Customers
OMI, a management agent pre-installed on many Azure Linux VMs, had an authentication flaw where requests without an Authorization header were treated as root. An attacker could send a single unauthenticated request to an exposed OMI HTTPS port to execute arbitrary commands as root, and three local privilege escalation flaws allowed a low-privileged user to become root.
Published on wiz.io
The Wiz Research Team recently found four critical vulnerabilities in OMI, which is one of Azure's most ubiquitous yet least known software agents and is deployed on a large portion of Linux VMs in Azure. The vulnerabilities are very easy to exploit, allowing attackers to remotely execute arbitrary code within the…
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 a conditional statement mistake combined with an authentication struct initialised to zero, so a missing Authorization header left the user identity as root instead of being rejected.
Impact
When the OMI HTTPS port is exposed, an attacker could take over the machine remotely as root and move laterally; other Azure services that do not expose the port limited the scope to local privilege escalation.
What the attacker needed
OMI installed on the target; OMI HTTPS port reachable by attacker
The fix
The flaw was fixed by initialising the authentication struct to an invalid value, and an official patch was released.
How it was found
- Send a legitimate command execution request to the OMI HTTPS port with valid credentials and observe the normal response.
- Send the same request with wrong credentials and confirm it is rejected with a 401 response.
- Send the same request again but omit the Authorization header entirely.
- Observe that the command executes and the response shows it ran as root.
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.
OMI is a small helper program that runs with the highest level of permission on a computer, called root. The program was supposed to check a password before running commands, but if no password was sent at all, it skipped the check and ran the command as root anyway. That meant anyone who could reach the management port could run their own commands on the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.