Azure Cosmos DB Flaw Let Researchers Reach Any Customer's Database
Wiz says its CosmosEscape exploit chain broke out of a query sandbox and grabbed a master key that unlocked databases across Microsoft's cloud. Microsoft has patched it.

Key points
- Cloud security firm Wiz found a flaw in Azure Cosmos DB, Microsoft's global database service, that could have exposed customer databases across the platform.
- The exploit chain, codenamed CosmosEscape, started with a booby-trapped query and ended with a platform-wide key giving read and write access to other tenants.
- Microsoft has patched the issue, and Wiz says it found no evidence any criminal group used it before disclosure.
- Cosmos DB customers do not need to rotate keys or take any action, according to Microsoft's advisory.
Researchers at cloud security firm Wiz say they found a way to break out of a shared corner of Microsoft's Azure Cosmos DB service and reach databases belonging to other customers.
Azure Cosmos DB is a database service Microsoft rents to companies who want to store customer records and similar data in the cloud. Wiz named the attack chain CosmosEscape and reported it privately to Microsoft, which has since patched it.
A paying customer could have used the service to spy on, or tamper with, the data of any other customer on the same platform. That's the kind of failure cloud providers are supposed to make impossible.
How did the attack work?
The chain begins inside Gremlin, a query language Cosmos DB uses for graph data (think social networks or fraud maps, where links between records matter as much as the records themselves). First reported by The Hacker News, the researchers started with a malicious query aimed at their own Gremlin database, then chained a series of weaknesses until they held a master key for the wider service.
Gremlin queries run inside a sandbox, a walled-off area meant to stop one customer's code touching anything else. Wiz found a way to escape that sandbox and run code on the underlying machine. From that foothold, they reached an internal component that handed out a platform-wide credential, effectively a skeleton key for Cosmos DB. With it, an attacker could read or alter data in any other tenant's databases on the same infrastructure.
Who is affected?
Any organisation using Azure Cosmos DB was theoretically exposed while the bug existed. Microsoft and Wiz say there's no sign anyone other than the researchers found it. That covers a large share of enterprise Azure users, since Cosmos DB backs everything from retail loyalty apps to airline booking systems.
Microsoft fixed the flaw on its side. Customers don't need to rotate their own keys or reconfigure anything.
| Item | Detail |
|---|---|
| Service | Azure Cosmos DB (Gremlin API) |
| Reported by | Wiz Research |
| Codename | CosmosEscape |
| Fix | Server-side patch by Microsoft |
| Customer action | None required |
Should ordinary customers worry?
Probably not, but understanding what almost happened matters. If a criminal group had found this first, they could have pulled personal data or medical files out of any company hosting them on Cosmos DB, without hacking that company directly. The victim would be the cloud, not the tenant.
The practical advice is dull but real: if a service tells you your data was accessed, act on the notice. Don't assume the cloud provider is flawless.
Why this keeps happening
This isn't Wiz's first Azure cross-tenant find. We covered a related class of flaw on 24 July 2026, when a default setting in Azure Automation could have let attackers impersonate any tenant's privileged accounts. The pattern Wiz keeps uncovering is consistent: shared infrastructure, internal services that trust each other too readily, and complex query engines that create more escape routes than anyone maps at build time. Fix one path and another surfaces.
Microsoft credited Wiz for the private disclosure. No customer action is required.
The real watch item here isn't this specific bug, it's the disclosure cadence. Wiz keeps finding these because it keeps looking. Most organisations sharing that infrastructure are not.


