Skip to content
RCE Write-up Intermediate

“Secret” Agent Exposes Azure Customers To Unauthorized Code Execution

A set of four vulnerabilities in the Open Management Infrastructure (OMI) agent, which is silently installed on Azure Linux VMs, allows unauthenticated remote code execution as root when the OMI HTTPS port is exposed, and local privilege escalation otherwise. Attackers could exploit these to take over machines, move laterally, and execute malicious code.

Nir Ohfeld Follow

Published on wiz.io

‍Update September 16, 07:00AM EST - The list of impacted services was updated thanks to individuals who approached Wiz (credit below).

Nir Ohfeld, on wiz.io

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 coding mistake in a conditional check combined with an uninitialized authentication structure causes any request without an Authorization header to be treated as having root privileges.

Impact

Attackers could gain root privileges and execute malicious code remotely on affected Azure Linux VMs, potentially leading to ransomware or lateral movement; however, the RCE is limited to instances where the OMI HTTPS port is exposed, while other services only allow local privilege escalation.

What the attacker needed

Azure Linux VM with OMI installed; OMI HTTPS port exposed (for RCE)

The fix

Microsoft patched the vulnerabilities in OMI version 1.6.8.1, and customers should verify their OMI version and restrict network access to the OMI ports.

How it was found

  1. Identify an Azure Linux VM with OMI installed and the HTTPS management port exposed.
  2. Send a command execution request to the OMI server without an Authorization header.
  3. The server processes the request with root privileges, allowing remote code execution.

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 background program that Microsoft automatically installs on many Linux virtual machines in Azure. A serious flaw meant that anyone who could reach a certain network port could send a command without logging in and have it run with the highest permissions, called root. That let an attacker take full control of 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.

More by Nir Ohfeld

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.