Stored XSS at Meta Careers
A whiteboard subdomain embedded whitelisted sites in an iframe, and the gist.github.com embed allowed injected script to run. An attacker could craft a shared whiteboard link that executes script in the victim's browser when opened.
Published on almuntadhar.medium.com
While doing recon on Facebook, i decided to run a simple Shodan dork to gather some information about the target, the dork was:
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
What the attacker needed
Victim opens a shared whiteboard link; attacker can create a live collaboration
How it was found
- Find the whiteboard subdomain during recon on the careers domain.
- Identify the list of domains allowed to be embedded in an iframe.
- Try injecting a script tag through each allowed domain until gist.github.com shows script execution in the console.
- Use a payload that calls the top window's alert to confirm execution.
- Create a live collaboration session and send it to the victim.
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 whiteboard site let people embed other websites inside it. One of those embedded sites (a code-sharing site) did not properly block a script tag, so the whiteboard ran the attacker's script. When a victim opens the shared whiteboard, that script runs in their browser, which is called stored cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.