anagnorisis.cloudSign in

← Hourlies

Hourly ·

CosmosEscape — Critical Azure Vulnerability Exposed Every Cosmos DB Database to Takeover

Wiz Research discovered a platform-wide master key in Azure Cosmos DB that could retrieve primary keys for any database on the service — including Microsoft's own Entra ID, Teams, and Copilot databases — all from publicly accessible endpoints.

CosmosEscape — Critical Azure Vulnerability Exposed Every Cosmos DB Database to Takeover

Wiz Research has uncovered CosmosEscape, a critical vulnerability in Azure Cosmos DB — Microsoft's flagship cloud database — that could have allowed attackers to seize full read and write access to every database on the service, including Microsoft's own internal systems.

The attack chain began with a single Gremlin query. Cosmos DB's custom .NET-based Gremlin engine attempted to sandbox user queries, but researchers found the restrictions didn't account for .NET reflection. By crafting a malicious Gremlin query against their own database, the Wiz team achieved arbitrary code execution on the DB Gateway — the multi-tenant service that processes all customer queries.

From there, they discovered what they're calling the Cosmos Master Key: a platform-wide signing key that could retrieve the primary key of any Cosmos DB account across tenants, regions, and API flavors (SQL, MongoDB, Cassandra, Gremlin). Paired with the Config Store — a regional registry listing every Cosmos DB account with subscription IDs, tenant IDs, and network settings — attackers could enumerate targets at platform scale and compromise them individually, all from publicly accessible endpoints.

The blast radius extended deep into Microsoft's own stack. Services including Microsoft Entra ID, Microsoft Teams, and Microsoft Copilot all store data in Cosmos DB, and their databases were potentially reachable. Even private and network-isolated accounts were exposed, since the compromised DB Gateway enforced those isolation boundaries.

Microsoft deployed a mitigation within 48 hours of Wiz's disclosure and has since completed a major architectural migration to harden the service. The company's investigation found no evidence of exploitation beyond the researchers' controlled testing, and no customer action is required.

Notably, the discovery was assisted by Atlas, Wiz's AI vulnerability researcher — an early signal of how AI-assisted security research is beginning to reshape vulnerability discovery at cloud scale. The full exploitation chain will be presented at Black Hat USA.

Sources: Wiz Research, Hacker News

More Hourlies Stories

Content on Anagnorisis is summarized, paraphrased, and editorialized from publicly available sources for length and clarity. Original sources are linked where available. All trademarks belong to their respective owners.

More from Anagnorisis