Skip to content
Access control Write-up Advanced

How we broke the cloud with two lines of code: the full story of ChaosDB

A chain of misconfigurations in Azure Cosmos DB's Jupyter Notebook feature allowed an unprivileged attacker to gain admin access to internal Service Fabric instances and obtain secrets that gave complete access to thousands of customers' databases. The attacker could also access management panels and potentially take over the entire service.

Nir Ohfeld Follow

Published on wiz.io

In August, 2021 the Wiz Research Team disclosed ChaosDB – a severe vulnerability in the popular Azure Cosmos DB database solution that allowed for complete, unrestricted access to the accounts and databases of several thousand Microsoft Azure customers, including many Fortune 500 companies. This vulnerability was so…

Nir Ohfeld, on wiz.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the Jupyter Notebook feature was added with multiple misconfigurations that allowed local privilege escalation and network access, leading to the exposure of internal certificates and secrets.

Impact

The vulnerability allowed complete, unrestricted access to the databases of several thousand Azure customers, and with the obtained secrets, the researchers could have taken over the entire Cosmos DB service; Microsoft mitigated it within 48 hours.

What the attacker needed

Azure Cosmos DB account with Jupyter Notebook enabled…; No special privileges required

The fix

Microsoft mitigated the vulnerability on their end in less than 48 hours, but customers also had to take manual actions to be fully protected.

How it was found

  1. Exploit misconfigurations in the Jupyter Notebook feature to escalate privileges locally.
  2. Use the escalated privileges to gain unrestricted network access.
  3. Obtain certificates and private keys that provide admin access to Cosmos DB accounts.
  4. Use the secrets to authenticate as admin to over 100 Cosmos DB-related management panels (Service Fabric instances).
  5. From the management panels, obtain authentication tokens for every Cosmos DB account in the regional cluster.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Azure Cosmos DB is a cloud database service. A feature called Jupyter Notebook, which lets users run code, had several security mistakes. These mistakes let an outsider break out of their own account and reach the internal systems that manage all customers' databases, giving them control over other people's data.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Nir Ohfeld

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.