Skip to content

Critical vulnerability in Azure Cosmos DB enabled cross-tenant database takeover

In brief: A platform credential known as the “Cosmos Master Key,” obtained via a Gremlin sandbox escape, would have allowed cross-tenant access to any Azure Cosmos DB account, but was fully remediated by Microsoft after being reported by Wiz, with no evidence of actual abuse.

The vulnerability disclosed by Wiz, dubbed “CosmosEscape,” made it possible to break out of Azure Cosmos DB’s Gremlin query sandbox and execute code on shared infrastructure. Data stores underlying Microsoft services such as Entra ID, Teams and Copilot were potentially affected as well.

Cloud security firm Wiz has disclosed a critical vulnerability in Microsoft Azure Cosmos DB that it calls “CosmosEscape.” The attack targeted the Gremlin API, one of Cosmos DB’s query interfaces. Wiz researchers Yuval Avrahami and Lior Maman found during testing that .NET exception errors pointed to a proprietary Gremlin execution engine rather than a standard implementation. By exploiting insufficiently restricted .NET reflection, the researchers managed to escape the Gremlin sandbox and execute arbitrary code on the Cosmos DB Database Gateway – the component that processes customer queries.

The access gained this way exposed credentials that could be used to retrieve the primary key of any Cosmos DB account – not just the researchers’ own test account. This platform credential, which Wiz calls the “Cosmos Master Key,” also unlocked Cosmos DB’s regional configuration store, making it possible to enumerate database accounts by tenant or subscription ID and then retrieve their primary keys. According to Wiz, the signing key was not restricted to a single account, region, or API variant – it worked across tenants, regions, and the SQL, MongoDB, Cassandra, and Gremlin API flavors. Because Cosmos DB underpins several Microsoft cloud services, Wiz stated that databases supporting Entra ID, Teams, and Copilot were affected as well. Even private and network-isolated Cosmos DB deployments were exposed, since the compromised Database Gateway was responsible for enforcing those network boundaries.

Wiz confidentially reported the vulnerability to Microsoft on November 20, 2025. According to the published disclosure timeline, Microsoft blocked the vulnerable Gremlin attack path within 48 hours and completed a more extensive architectural redesign across all Azure regions by July 2026. Microsoft stated that its investigation found no evidence of unauthorized activity beyond the researchers’ testing, that no customer data was accessed, and that customers do not need to take any action of their own. According to Microsoft, the platform-wide authentication mechanism identified by Wiz (the “Cosmos Master Key”) has also been removed.

For CISOs, the case points to risks below the control layers that cloud customers can configure or monitor themselves. Sakshi Grover, Senior Research Manager at IDC, notes that CosmosEscape shows how tenant isolation can fail even below the layers visible to the customer. When evaluating managed database services, she says, it is not enough to rely on features such as encryption, private network connectivity, or identity controls – organizations should also examine how cloud providers themselves secure isolation at the infrastructure level and how incidents of this kind are addressed in contractual and reporting processes.


Source: www.csoonline.com · Published August 4, 2026
Lumi AI News — AI-assisted curation pursuant to Art. 50 EU AI Act. Paraphrasing and classification by Lumi News Pipeline v1.8.3.

Share on: