CosmosEscape in Azure Cosmos DB Exposed Cross-Tenant Account Takeover Path
Vulnerability Disclosure · 8 sources · Updated 3mo ago · First seen Jul 30, 2026

Microsoft has patched a critical Azure Cosmos DB vulnerability chain dubbed CosmosEscape that could have let an attacker move from a crafted Gremlin API query to code execution on a multi-tenant backend component and ultimately obtain secrets capable of accessing virtually any customer Cosmos DB account. Wiz reported that insufficient restrictions around .NET reflection allowed escape from the Gremlin sandbox, exposing a platform-wide signing secret—described as the Cosmos Master Key—and a regional account directory that could be used to locate target accounts and retrieve their primary keys.
With those primary keys, an attacker could have gained full read and write control over Cosmos DB deployments across SQL, MongoDB, Cassandra, and Gremlin APIs, including private databases across regions and potentially data tied to Microsoft services such as Entra ID, Teams, and Copilot. Microsoft said it blocked the vulnerable Gremlin entry point within 48 hours of Wiz’s November 2025 report, later completed broader fixes across all regions, removed the shared platform-wide key, and added controls to prevent similar backend access; the company said its review found no evidence of exploitation or customer data access beyond the researchers’ testing, and no customer action is required.


