Skip to content
Access control Write-up Advanced

ChaosDB: How we hacked thousands of Azure customers’ databases

A series of misconfigurations in the Cosmos DB Jupyter Notebook feature allowed any user to escalate privileges and steal primary keys of other customers' databases. Attackers could then use these keys to read, write, or delete data in thousands of Azure customers' Cosmos DB accounts.

Nir Ohfeld Follow

Published on wiz.io

Nearly everything we do online these days runs through applications and databases in the cloud. While leaky storage buckets get a lot of attention, database exposure is the bigger risk for most companies because each one can contain millions or even billions of sensitive records.

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 a privilege escalation vulnerability in the Jupyter Notebook container allowed access to other customers' notebooks and their secrets.

Impact

Attackers could read, write, or delete data in thousands of Azure customers' Cosmos DB accounts; Microsoft disabled the vulnerable feature within 48 hours and notified over 30% of customers to rotate keys.

What the attacker needed

Access to the internet; A Cosmos DB account with the notebook feature enabled

The fix

Microsoft disabled the vulnerable notebook feature and is redesigning it; customers were advised to rotate their primary keys.

How it was found

  1. Access the Jupyter Notebook feature in Cosmos DB.
  2. Exploit misconfigurations to escalate privileges into other customers' notebooks.
  3. Harvest Cosmos DB primary keys from the compromised notebooks.
  4. Use the stolen keys to gain full read/write/delete access to the affected Cosmos DB accounts.

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.

Cosmos DB is a cloud database service from Microsoft. A feature meant for data visualisation had security holes that let anyone take control of other customers' databases. The attackers could then steal the secret keys that unlock those databases, giving them full access to the 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.