
Security researchers at Wiz found a way to break out of Azure Cosmos DB’s Gremlin query sandbox and reach a platform-wide signing secret that could unlock the primary account key of any database on the platform. The attack chain, which Wiz calls CosmosEscape, starts with a crafted query sent to an attacker-controlled Gremlin database. The Cosmos DB Gremlin engine translates those queries into .NET code and runs them in a restricted environment — but Wiz found that the restrictions didn’t account for .NET reflection, which let them read and write arbitrary files. From there, they obtained a platform-wide signing secret and a directory of regional accounts, giving them the ability to look up any tenant and retrieve its primary account key. A full read-write takeover of any customer’s database followed.
Wiz reported the vulnerability to Microsoft in November 2025. Microsoft blocked the vulnerable Gremlin entry point within 48 hours and completed the deeper platform-wide fix across all regions by July 2026. The signing secret itself has been eliminated. Microsoft said its review found no unauthorized activity outside Wiz’s own testing, and that no customer data was accessed. No customer action is required — the fix was applied on the server side with no update needed from users.
