# CosmosEscape: How Wiz Researchers Uncovered a Critical Azure Cosmos DB Vulnerability

Original title: CosmosEscape: Taking over Every Database in Azure Cosmos DB

> Hacker News story 49108963 · language: en · submitted 2026-07-30
> Web version: https://zeli.app/story/49108963
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 71 · by [uvuv](<https://news.ycombinator.com/user?id=uvuv>) · 💬 16
[original](<https://www.wiz.io/blog/cosmosescape-taking-over-every-database-in-azure-cosmos-db>) · [HN discussion](<https://news.ycombinator.com/item?id=49108963>)

## Summary

Our team at Wiz Research discovered CosmosEscape, a severe flaw in Azure Cosmos DB that allowed attackers to compromise every database in the service. By exploiting the Gremlin API, we identified a platform-wide secret we called the Cosmos Master Key, which enabled full takeover and enumeration of accounts. This vulnerability threatened Microsoft's internal services like Teams and Copilot. Microsoft has since fully remediated the issue without evidence of exploitation.

## Key quote

> Cloud platforms are built in layers, and a vulnerability at the infrastructure tier can cascade upward to threaten the services built on top of it.

## HN discussion (16 comments)

### [gtowey](<https://news.ycombinator.com/item?id=49111735>)

> \> Cosmos DB's engine translated Gremlin queries into .NET code, enforcing a set of restrictions designed to prevent queries from reaching beyond Gremlin operations. These restrictions, however, didn't sufficiently account for .NET reflection
>
> Wow, this is so unbelievably amateurish.

### [troelsSteegin](<https://news.ycombinator.com/item?id=49109782>)

> "Cosmos Master Key"... I can see why that would have been convenient, but talk about a footgun. Right out of a Marvel movie. Still, if admin backdoor access is business-necessary, is the answer a unique admin access key per account?

### [lateral_cloud](<https://news.ycombinator.com/item?id=49110252>)

> It took them 6 months to fix this properly?

---

## Cite

- Page: https://zeli.app/story/49108963
- Date: 2026-07-30
- Source: wiz.io (https://www.wiz.io/blog/cosmosescape-taking-over-every-database-in-azure-cosmos-db)
- Hacker News: https://news.ycombinator.com/item?id=49108963

## Other languages

- zh: https://zeli.app/zh/story/49108963 · markdown: https://zeli.app/zh/story/49108963.md
