Microsoft's most widely used cloud database just had a very bad bug — one that, in theory, could have handed an attacker the keys to every single customer's data on the service at once. The flaw has been fixed, and Microsoft says it found no sign anyone actually exploited it. But the details of how close it came are worth understanding, especially if your work or business touches Microsoft 365, Teams, or Copilot.
The short version
Cybersecurity firm Wiz — acquired by Google's parent company Alphabet in a $32 billion deal that closed in March 2026 — disclosed a critical vulnerability in Azure Cosmos DB, Microsoft's flagship NoSQL database service. Wiz calls it CosmosEscape.
At its worst, the bug would have let an attacker with nothing more than an ordinary Cosmos DB account break out of the service's query sandbox, grab a single platform-wide signing key, and use it to read or overwrite data in any customer's database on the service — not just their own. Microsoft has since eliminated that master key from Cosmos DB's architecture entirely and says its investigation turned up no evidence of customer impact.
How CosmosEscape worked
Cosmos DB underpins a huge amount of what runs on Azure: retail recommendation engines, chatbots, web apps, and Microsoft's own products including Teams and Copilot. Wiz researcher Ami Luttwak, the company's CTO, put it simply: when you build in the cloud on Microsoft, the data usually ends up in Cosmos DB.
Wiz's researchers found they could craft a malicious query through Cosmos DB's Gremlin API — the graph-database query language the service supports — that escaped the sandbox meant to contain it. That gave them code execution on a component Wiz calls the DB Gateway, which runs customer queries on Microsoft's shared, multi-tenant infrastructure.
From there, they reached something called the Config Store — which, notably, was itself just another Cosmos DB database. Querying it exposed a master key. That master key could be used to pull the primary access key for any tenant, identified by account or subscription ID. Put together, the chain meant an attacker could look up which Cosmos DB accounts existed in a region, then mint themselves full read-and-write access to any of them, including databases belonging to Microsoft's own internal services.
Wiz says it partly found the bug using Atlas, its newly launched autonomous AI vulnerability-research system — the same tool the company says has been used to uncover 200-plus previous flaws and topped a leading benchmark for AI-driven security research.
Timeline
November 20, 2025 — Wiz reports the vulnerability to Microsoft; Microsoft acknowledges it the same day.
November 22, 2025 — Microsoft ships a hotfix blocking the specific Gremlin entry point Wiz used, while starting work on a permanent fix.
July 2026 — Microsoft completes a full architectural overhaul across all Azure regions, removing the Cosmos master key from the system altogether and adding stronger service-to-service authentication and monitoring.
July 29, 2026 — Wiz publishes its disclosure.
August 6, 2026 — Wiz is scheduled to present the full technical exploit chain at Black Hat USA, in a talk titled "One Key to Rule Them All: Taking Over a Flagship Cloud Service."
The bug carries no CVE identifier or CVSS score, and Microsoft hasn't said how many customers could theoretically have been affected or how long the vulnerable path existed before Wiz found it.
Microsoft's response
Microsoft says the issue is fully resolved and that its internal review found no evidence of unauthorized access beyond Wiz's own controlled testing — no customer data accessed, no customer action required. A company spokesperson thanked Wiz for reporting the flaw through coordinated disclosure and said Azure will keep investing in additional security hardening.
It's worth being precise about what that assurance does and doesn't cover: Microsoft is describing what its logs showed during the period it reviewed, not certifying how long the flaw existed in production before that. Because an attacker with the master key could have operated without leaving much of a trace, the honest answer is that the exposure window isn't fully known — even though the specific path Wiz used is now closed.
Why this isn't just an "enterprise IT" story
Cosmos DB doesn't just sit behind obscure backend systems. Microsoft's own documentation notes that Teams message data lives in Cosmos DB, and Copilot stores user queries and conversation history there too. Wiz said databases tied to both products were potentially reachable through the flaw, though it says it didn't access their contents. If your organization — or your school, business, or newsroom — runs on Microsoft 365 and Copilot, this is the kind of infrastructure-level bug that sits upstream of tools people use every day without ever thinking about where the data lives.
Outside researchers described the flaw as serious without treating it as an outlier. Karl Fosaaen, senior vice president at cybersecurity firm NetSpi, called it "not good," noting Cosmos DB carries heavy usage and frequently sensitive data — while adding that this kind of discovery happens periodically across cloud providers. Vaisha Bernard of Dutch firm Eye Security made a similar point: researchers have lately been finding a number of high-severity cloud vulnerabilities at major infrastructure providers, and if an attacker had found this one first, the damage could have been serious.
Not the first Cosmos DB scare
This is the third major Cosmos DB security story in five years. Wiz disclosed a flaw called ChaosDB in 2021, and a related issue called CosMiss surfaced in 2022 — both stemming from bugs in Cosmos DB's Jupyter Notebook feature. CosmosEscape is technically unrelated to either; it targets the Gremlin query engine and gateway architecture rather than the notebook feature. That three separate serious flaws have surfaced in the same database service over five years is itself part of why security researchers are watching Cosmos DB closely.
The bottom line
Nothing about this requires action from ordinary Cosmos DB customers — the fix is on Microsoft's side, and Microsoft says there's no evidence of exploitation. But CosmosEscape is a useful reminder of a cloud-computing reality that's easy to forget: when a single foundational service underpins as much of a provider's ecosystem as Cosmos DB does for Azure, a flaw in one shared component can, in theory, cross the boundary between "your data" and "everyone else's data" at once. That's precisely the kind of bug cloud providers work hardest to prevent — and precisely the kind that gets the most attention when researchers find it first.
This article draws on Wiz Research's disclosure, Reuters' reporting, and coverage from CGTN, The Hacker News, and TechTarget. It will be updated if further details emerge from Wiz's Black Hat USA presentation.
Source
Wiz Research: ChaosDB vulnerability in Azure Cosmos DB