Media deletion CSRF vulnerability on Instagram
A copyright-related endpoint on Instagram deleted a user's media via a GET request without a CSRF token. An attacker could make a logged-in victim open a crafted URL to delete their post or story.
In January 2019, I discovered a CSRF vulnerability in Instagram's copyright workflow that could be abused to delete a victim's own post or story.
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
The endpoint performed a state-changing deletion using a GET request and lacked a CSRF token or other request-verification mechanism.
Impact
An attacker could trick a logged-in victim into deleting their own post or story; the behaviour worked in both the web interface and the Android app.
What the attacker needed
Victim is logged in to Instagram; victim opens a crafted URL; attacker knows the media ID
The fix
Instagram deployed a permanent fix the day after the report, though the text does not describe the fix itself.
How it was found
- Upload a video that triggers Instagram's copyright workflow.
- Review the related requests and endpoints.
- Identify the copyright endpoint that deletes media via a GET request.
- Craft a URL to that endpoint with the victim's media ID.
- Make the logged-in victim open the crafted URL, causing deletion.
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 are logged into a website, your browser sends your session cookie with every request. If a website performs a destructive action (like deleting a post) just because a URL was opened, another site can trick you into opening that URL and the action happens without your intent. This is called cross-site request forgery (CSRF).
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.