Skip to content
IDOR Write-up Intermediate

How I Hacked Your Facebook Photos

A Graph API endpoint allowed deletion of any photo album using a Facebook for Android access token, without checking ownership. An attacker could delete albums belonging to any user, page, or group.

Meta

Published on zerohacks.com

That would be pretty upsetting, wouldn’t it? This post is about a vulnerability I found that allowed malicious users to delete any photo album on Facebook.

Laxman Muthiyah, on zerohacks.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 Graph API endpoint for deleting albums did not verify that the caller owned the album, allowing any valid Android app token to delete arbitrary albums by ID.

Impact

Any photo album owned by a user, page, or group could be deleted by an attacker who had a Facebook for Android access token and knew the album ID.

What the attacker needed

A Facebook for Android access token; knowledge of the victim's album ID

The fix

The vulnerability was fixed by Facebook within two hours of acknowledgement.

How it was found

  1. Try to delete an album using a Graph Explorer token; receive an error that the application lacks capability.
  2. Use a Facebook for Android access token to delete own album; succeeds.
  3. Use the same token to delete a victim's album by its ID; succeeds.

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.

The Facebook Graph API is a way for apps to read and change data. Normally, an app can only delete things that belong to the person using it. Here, a special token from the Facebook Android app could delete anyone's photo album just by knowing its ID, because the server did not check who owned the album.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.