Skip to content
Access control Write-up Intermediate

How I Exposed Your Private Photos

The Facebook Graph API endpoint for synced mobile photos only checked the owner of the access token, not which application was making the request. Any malicious Facebook app with user_photos permission could read a user's private synced photos.

Meta

Published on zerohacks.com

All of us have the habit of taking photos using our mobile, in that, there would definitely be some private photos. What if it’s hacked?

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

Impact

A malicious Facebook app with user_photos permission could read a user's private synced mobile photos; after the fix, only whitelisted official apps can access them.

What the attacker needed

Victim has synced photos; victim grants user_photos to a malicious app

The fix

Facebook fixed it by whitelisting only their official mobile applications on that endpoint, so other apps can no longer access synced photos.

How it was found

  1. Find the Graph API endpoint that handles synced photos.
  2. Send a GET request to that endpoint with a user access token.
  3. Observe that the response returns the user's synced photos.
  4. Realise that any app with user_photos permission can make the same request.

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.

When you use a Facebook app, it asks for permissions, like 'user_photos', to see your photos. The bug was that Facebook's photo-syncing service only checked that the token belonged to you, but not that the app asking was allowed to see your private synced photos. So a bad app could grab all your backed-up mobile photos without you knowing.

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 from Meta

View all

The newest disclosed reports for this program.

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.