All vulnerabilities
CRITICALInfraexploited in the wild

CLOUD-OMIGOD-2021

Cloud · Azure · Azure Open Management Infrastructure (OMI)

Summary

On 14 September 2021 Wiz disclosed OMIGOD, a set of four flaws in Open Management Infrastructure (OMI), an agent that Azure silently auto-deploys onto many Linux VMs via services such as Log Analytics, Azure Automation, Azure Diagnostics and Defender for Cloud. The flagship bug, CVE-2021-38647 (CVSS 9.8), gave unauthenticated remote code execution as root, while CVE-2021-38645, CVE-2021-38648 and CVE-2021-38649 were local privilege escalations. The agent ran as root and could expose a management port (5985, 5986 or 1270); because the authorization code left the AuthInfo struct at its zero-initialized default of uid 0 and gid 0, a request that omitted the Authorization header was treated as an authenticated root request, so a single crafted packet yielded root code execution. This was a provider-side flaw under shared responsibility that most customers did not know was installed and could not patch themselves. Unlike the other entries here it was exploited in the wild within days, with attackers scanning for exposed agents and dropping Mirai botnet and cryptominer payloads.

How to avoid it in your code

  • Apply the OMI agent update to version 1.6.8.1 or later, or confirm Azure auto-update completed.
  • Block external access to ports 5985, 5986 and 1270 with NSGs and firewalls.
  • Inventory VMs for the omiengine agent installed by Log Analytics and management extensions.
  • Use private networking and least privilege so management agents are never internet-reachable.
  • Enable Defender for Cloud and monitor for unauthenticated OMI requests and crypto-mining activity.

References

Related vulnerabilities

All Infra →