Skip to content
CSRF Write-up Intermediate

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.

๐€๐’๐”๐‘๐€ Follow

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.

๐€๐’๐”๐‘๐€, on medium.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

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

  1. Log in as a victim and upload a post with media.
  2. As an attacker, visit the victim's profile page to view their post.
  3. Extract the image_id from the image URL and the imagetype_id from the static image URL.
  4. Create an HTML file that sends a GET request to the edit endpoint with the victim's identifiers and a new description.
  5. Open the HTML file in the victim's browser to change the description.
  6. 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.

More by ๐€๐’๐”๐‘๐€

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.