Cloud Security
Wiz Exposes Cosmos DB Master Key Flaw; Six-Month Fix Reignites Cloud Responsibility Debate
A critical Azure Cosmos DB vulnerability allowed attackers to access every database through a platform-wide secret, raising uncomfortable questions about tenant isolation, remediation timelines, and customer agency in cloud vulnerabilities.
InfoQ
Security researchers at Wiz have unveiled CosmosEscape, a vulnerability chain affecting Azure Cosmos DB that granted unrestricted read and write access to all customer databases on the platform. Microsoft has completed remediation and determined that no customer action is necessary—but the incident has sparked broader conversations about what the lengthy fix reveals about cloud security responsibility.
How the Attack Worked#
The vulnerability began modestly: a specially crafted query targeting a Gremlin database that the researcher controlled. Cosmos DB compiled Gremlin queries into .NET code with sandbox restrictions intended to confine them to permitted Gremlin operations. However, the sandbox failed to account for .NET reflection techniques, allowing an attacker to break out and gain code execution on the DB Gateway—the multi-tenant infrastructure processing all customer queries.
From that foothold, the exploit exposed what researchers call the Cosmos Master Key, a platform-wide credential capable of retrieving the primary key of any Cosmos DB account and enumerating databases by subscription and tenant identifiers. Because Cosmos DB underpins critical Microsoft services including Teams and Copilot, the blast radius extended to Microsoft's own infrastructure.
Remediation Timeline and Key Questions#
Wiz reported the flaw on November 20, 2025, and Microsoft blocked the vulnerable Gremlin entry point with a hotfix within two days. Fully removing the platform-wide key, however, required architectural rearchitecture and took until July 2026 to roll out across all regions—a delay that sparked debate among practitioners.
Some observers noted that the master key was integral to the gateway's credential model: it had been used to fetch each account's private key before forwarding requests. Removing it meant rebuilding core components of a service both Microsoft and tens of thousands of customers depended on. Others questioned the invisibility of the fix itself: customers must simply accept Microsoft's assurance that remediation succeeded, with no independent way to verify it.
Notably absent from the public record are a CVE identifier, a CVSS score, an MSRC advisory, and any stated exposure window—details that would typically accompany critical findings of this severity.
The Shared Responsibility Paradox#
The incident has crystallized a tension at the heart of cloud security: the shared responsibility model clearly assigns platform vulnerabilities to the provider's side, yet customers remain entirely dependent on the provider for both remediation and assurance. As one Reddit commenter observed, "As a Cosmos DB customer, there is nothing we could have done differently to prevent this; it lives entirely in Microsoft's infrastructure."

