CosmosEscape exposed cross-tenant access path in Azure Cosmos DB

Cross-tenant access path
Wiz disclosed CosmosEscape, a now-patched Azure Cosmos DB chain that could have turned access to an attacker's own Gremlin database into full read and write access across customer tenants. Microsoft blocked the entry point within 48 hours of the November 2025 report and completed the longer-term fix across all regions in July 2026.
Microsoft also eliminated the platform-wide key. It said its review found no unauthorized activity outside the researchers' testing, no customer data was accessed, and no customer action is required. No CVE or severity score is listed, and the potential exposure period is unknown.
How the sandbox escape worked
The chain required an attacker's Gremlin database and its account credentials, not access to a victim database. Wiz said the Cosmos DB engine translated Gremlin queries into .NET code, but the sandbox did not account for .NET reflection, enabling file-read and file-write primitives before arbitrary code execution.
Code ran on the DB Gateway, which processes queries on multi-tenant Azure Service Fabric clusters. Databases were not stored there, but the gateway could retrieve an account's primary key. Microsoft says a Cosmos DB primary key grants full control over all resources in that account.
Why the shared secret mattered
Gateway credentials exposed a signing secret Wiz called the Cosmos Master Key. Wiz said it could retrieve primary keys across tenants, regions, and the SQL, MongoDB, Cassandra, and Gremlin APIs. It also opened the Config Store, a regional directory of account names, tenant and subscription identifiers, network settings, and tags.
Wiz said the path could reach private and network-isolated accounts because the compromised gateway enforced those boundaries inside the service. Researchers had write access to the Config Store, but did not report changing another customer's network settings.
Practical business implication
Businesses can retain Microsoft's no-action guidance while recording the incident in cloud-risk reviews. A practical control check is to map where Cosmos DB primary keys grant broad authority, then review key governance, logging assumptions, and dependence on service-side isolation.

