Cybersecurity firm Wiz has revealed a critical flaw named 'CosmosEscape' that could have granted attackers a 'Master Key' to any Azure Cosmos DB account. This vulnerability potentially allowed full read and write access across the entire platform.
Key Takeaways
- The 'CosmosEscape' flaw could have provided attackers with a platform-wide master key.
- Attackers could have gained full read and write access to any Cosmos DB account.
- The exploit targeted the Gremlin API through .NET reflection bypass.
- Microsoft has successfully deployed long-term architectural fixes across all regions.
A massive security vulnerability, dubbed 'CosmosEscape', has been discovered in Microsoft's Azure Cosmos DB service. According to a report by cybersecurity firm Wiz, this flaw could have allowed attackers to bypass security boundaries and gain unauthorized access to databases across the entire service, including those belonging to major organizations and even Microsoft itself.
The vulnerability was traced back to the Gremlin API, which uses a custom engine to execute graph queries. Researchers discovered that while the engine utilized a sandbox to restrict operations, it failed to account for .NET reflection. This oversight allowed attackers to achieve arbitrary code execution on the DB Gateway, which operates on multi-tenant Service Fabric clusters.
Why This Matters
BozokMedia analysis shows that the implications of this flaw were systemic. Because Microsoft relies on Cosmos DB to power essential services like Entra ID, Teams, and Copilot, the potential blast radius was enormous. An attacker possessing the discovered 'Cosmos Master Key' could have filtered databases by subscription or tenant IDs, enabling highly precise and devastating targeting of specific corporate entities.
The discovery of the 'Cosmos Master Key' represents one of the most significant potential cloud-scale breaches identified in recent years.
The technical depth of the exploit allowed researchers to access a configuration store that contained metadata for every Cosmos DB account. By querying this store, an attacker could enumerate all accounts in a region and retrieve the primary key for any specific target. Fortunately, Wiz reported the issue in November 2025, and Microsoft responded with a rapid hotfix followed by a permanent architectural overhaul completed in July.
Frequently Asked Questions
1. Was any customer data actually stolen?
No. Microsoft conducted an extensive review of access logs and found no evidence of unauthorized activity outside of Wiz's controlled testing.
2. Do I need to take any action to secure my database?
No action is required from customers, as Microsoft has already implemented the necessary security patches and structural fixes.