Cool XSRF vulnerability in the media upload functionalityย , whic
The media upload functionality lacked a CSRF token, and the POST request could be converted to a GET request to bypass SameSite=Lax cookie restrictions. An attacker could edit or delete another user's media by crafting a malicious HTML page that sends a GET request with the victim's image identifiers.
Published on medium.com
Hello Community ๐, Iโm Divyank, a application security researcher (bug bounty hunter). This is my first write-up, and in it, Iโll be explaining in detail the XSRF vulnerability I recently discovered on a popular platform.
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
An attacker could modify or delete a victim's media content without consent, potentially causing loss of important content and reputational damage.
What the attacker needed
Victim logged in; attacker knows victim's image_id and imagetype_id; victim clicks a link or opens a malicious page
How it was found
- Log in as a victim and upload a post with media.
- As an attacker, visit the victim's profile page to view their post.
- Extract the image_id from the image URL and the imagetype_id from the static image URL.
- Create an HTML file that sends a GET request to the edit endpoint with the victim's identifiers and a new description.
- Open the HTML file in the victim's browser to change the description.
- For deletion, use a similar HTML file with only image_id and imagetype_id.
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.
Cross-Site Request Forgery (CSRF) is an attack where a malicious website tricks a logged-in user's browser into sending a request to another site, like changing their profile or deleting content. Here, the site did not check for a secret token, so an attacker could make the victim's browser perform actions without their knowledge. The attacker only needed to know some public identifiers of the victim's media to target it.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.