November 17, 2026
Facebook IDOR: Deleting Any Photo Album (Case Study)
Facebook IDOR let users delete any visible album via the Graph API. How the missing ownership check worked, impact, and API fixes.

By Muhammad Asim Shahzad
2 min read
Facebook IDOR: How Any Photo Album Could Be Deleted
A $12,500 bug bounty case where a privileged app token and a missing ownership check met on a single Graph API call
AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.
Your photos could vanish without you touching a thing. In early 2015, Laxman Muthiyah reported a Facebook IDOR that let one user delete photo albums owned by other users, Pages or groups, as long as the album was visible to them. Facebook shipped a fix in under two hours after acknowledging the report and paid $12,500.
Disclaimer:_ Educational and defensive use only. This was fixed in 2015. Request formats, token types and reproduction details are intentionally omitted._
Vulnerability Overview
- Type: Insecure direct object reference (IDOR) / broken object-level authorization on a delete operation
- CWE (analytical mapping, not from the source): CWE-639 (Authorization Bypass Through User-Controlled Key), CWE-862 (Missing Authorization)
- CVE: Not reported
- Severity/CVSS: Not reported. Bounty: $12,500, source-reported
How the Facebook IDOR Worked (high level)
Facebook's Graph API is the shared back end for its own apps and for third-party developers. Each access token carries the capabilities of the app that issued it. Public developer documentation said albums could not be deleted through the API, and a normal developer token was refused with a message saying the app lacked that capability.
That refusal was a clue. It implied some app had the capability. The researcher tried a token belonging to Facebook's own mobile app, which is more privileged, and the delete worked on his own album. The real question came next: would it work on an album that was not his?
It did. The endpoint checked whether the calling app was allowed to delete albums, but not whether the calling user owned the album named in the request. Album IDs are not secret, so anything a user could view became something they could erase.
Impact
Per the researcher, an attacker could delete any album they could see: public albums of individuals, plus albums owned by Pages and groups. For people, that is permanent loss of memories. For brands and communities, it is destructive vandalism at scale, with no social engineering needed.
Preventing Facebook-Style IDOR in Your API (my own analysis)
1. Authorize the object, not just the caller. App capability, token scope and user identity are separate checks. Every read, update and delete must confirm that this user may act on this specific object.
2. Centralize the policy. Put ownership and role logic in one authorization layer that every client path calls, including first-party apps.
3. Give destructive actions extra friction. Soft-delete with a restore window, rate-limit bulk deletes, and log actor plus owner for every removal.
# Pseudocode: object-level authorization on delete
def delete_album(album_id, ctx):
album = albums.get(album_id)
if album is None:
raise NotFound()
if not ctx.app.has_capability("album:delete"):
raise Forbidden("app not permitted")
if not policy.can_delete(actor=ctx.user, resource=album):
audit.log("denied_delete", ctx.user.id, album.owner_id)
raise NotFound() # don't confirm existence to non-owners
albums.soft_delete(album_id, by=ctx.user.id, restore_days=30)
audit.log("album_deleted", ctx.user.id, album.owner_id)
def can_delete(actor, resource):
return (resource.owner_id == actor.id
or actor.is_admin_of(resource.owner_id)) # page/group admins# Pseudocode: object-level authorization on delete
def delete_album(album_id, ctx):
album = albums.get(album_id)
if album is None:
raise NotFound()
if not ctx.app.has_capability("album:delete"):
raise Forbidden("app not permitted")
if not policy.can_delete(actor=ctx.user, resource=album):
audit.log("denied_delete", ctx.user.id, album.owner_id)
raise NotFound() # don't confirm existence to non-owners
albums.soft_delete(album_id, by=ctx.user.id, restore_days=30)
audit.log("album_deleted", ctx.user.id, album.owner_id)
def can_delete(actor, resource):
return (resource.owner_id == actor.id
or actor.is_admin_of(resource.owner_id)) # page/group adminsKey Takeaways
- "This app may delete albums" and "this user may delete this album" are different questions; answer both.
- First-party clients are not a trust boundary. Their tokens reach the same API attackers can.
- Error messages that reveal hidden capabilities are a map for testers; keep them generic.
Credit & Sources
Research by Laxman Muthiyah: Deleting any photo albums โ How I Hacked Your Facebook Photos (originally published February 2015; the page now shows a later update date). Facts come from that source; analysis and code are original.
Next breakdown: the Stripe session lockout that missed one server-side check. Follow @masimshahzad for daily bug bounty breakdowns.