Skip to content
Info disclosure Write-up Advanced

A now-patched vulnerability in the web version of Facebook Messenger allowed any website to expose who you have been messaging with.

A side-channel attack called Cross-Site Frame Leakage (CSFL) exploited iframe count patterns in Facebook Messenger's web interface to determine whether a user had previously chatted with a specific person or bot. An attacker could trick a logged-in user into visiting a malicious site and then infer private contact information.

Ron Masas Follow

Published on imperva.com

In a previous post, I showed how your Facebook likes, location history, and other metadata could have been extracted from your Facebook account using a side-channel attack I named “Cross-Site Frame Leakage,” or CSFL for short.

Ron Masas, on imperva.com

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 Messenger web interface used iframes whose loading behaviour differed between 'full' and 'empty' conversation states, and the number of iframes could be observed cross-origin, leaking state information.

What the attacker needed

Victim is logged into Messenger; victim visits attacker's site; victim clicks on the page

The fix

Facebook mitigated the issue by randomly creating iframe elements, and later completely removed all iframes from the Messenger user interface.

How it was found

  1. Trick a Messenger user into opening a link to a malicious site.
  2. Get the user to click anywhere on the page, for example a video play button.
  3. A new tab opens while the previous one stays open in the background.
  4. The new tab plays a video to keep the user busy while the Messenger conversation endpoint loads in the background tab.
  5. Record the iframe count over time to detect whether the user has been in contact with specific users or bots.

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.

This bug is a side-channel attack: instead of breaking into Facebook directly, the attacker watches indirect clues from the browser. By counting how many frames (small embedded windows) appear and disappear over time on a page, the attacker can guess whether you have talked to someone before. The victim only needs to visit a malicious website and click once.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Ron Masas

View all

3 more disclosed reports, best first.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.