Delete Any Photos In Facebook
The edit-series endpoint failed to check ownership of the Cover Image photo, so an attacker could attach any public photo ID to their own series. Deleting the series then deleted the victim's photo along with it.
Published on lokeshdlk77.medium.com
This post is about an bug that I found on Facebook which used to delete any publicly visible photos by editing the series feature
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 edit-series handler omitted the ownership check on the Cover Image field that the create-series handler enforced.
Impact
An attacker could delete any publicly visible photo on Facebook by attaching it to their own series and deleting the series.
What the attacker needed
A Facebook account able to create a series; victim's photo is publicly visible; attacker knows the victim's photo ID
The fix
The ownership check on the Cover Image field during series editing was fixed.
How it was found
- Create a series so it has a Poster Art and optionally a Cover Image.
- Edit the series and replace the custom_thumbnail_id value with a victim's public photo ID.
- Delete the series, which also deletes the attached Cover Image.
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 series is a collection of videos and images on Facebook. When you edit a series, the server should check that any image you attach belongs to you, but it did not. So an attacker could attach someone else's public photo to their own series and then delete the series, which also deleted that photo.
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.