BingBang: How a simple developer mistake could have led to Bing.com takeover
A misconfigured multi-tenant Azure Active Directory application allowed any Azure user to log in and access a content management system that controlled Bing.com search results. This access enabled the researchers to modify search results and inject a cross-site scripting payload that could steal Office 365 access tokens from Bing users.
Published on wiz.io
This blog provides a high-level overview of the vulnerability and its impact. For a technical deep dive, please refer to our technical blog.
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 multi-tenant application did not validate the user's original Azure tenant, allowing any Azure user to authenticate and access the CMS.
Impact
An attacker could modify Bing search results to spread misinformation or phish, and could steal Office 365 access tokens to read emails, calendars, Teams messages, SharePoint documents, and OneDrive files of millions of Bing users; the tests were limited to the researchers' own account.
What the attacker needed
An Azure user account; access to the internet; victim visits Bing.com
The fix
Microsoft fixed the vulnerable applications and modified some AAD functionality to reduce customer exposure.
How it was found
- Scan for multi-tenant Azure AD applications that lack proper tenant validation.
- Log in to the vulnerable Bing Trivia app using a personal Azure user account.
- Access the linked content management system that controls Bing.com search results.
- Modify a search result in the CMS and push it to production to confirm control.
- Inject a cross-site scripting payload into Bing.com and verify it executes.
- Craft an XSS payload that steals Office 365 access tokens from logged-in Bing users.
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.
A multi-tenant app is a cloud application that lets users from any organisation sign in. The developers must check which organisation each user belongs to and only allow the right ones. Here, that check was missing, so anyone with an Azure account could get in and reach a tool that changed Bing search results. They could also insert a script that ran in visitors' browsers and stole their Office 365 login tokens.
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.