Skip to content
CSRF Write-up Beginner

How I Found a CSRF Vulnerability in Profile Picture Deletion

The profile picture deletion endpoint lacked CSRF protection, allowing an attacker to craft a malicious request that, when clicked by a logged-in user, would delete their profile picture without consent.

EL_cazad0r Follow

Published on medium.com

In this article, I’ll share a critical Cross-Site Request Forgery (CSRF) vulnerability I discovered on a web application (masked as redacted) that allowed unauthorized deletion of a user’s profile picture. While the impact may seem minor at first glance, it highlights the importance of implementing proper server-side…

EL_Cazad0r, 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

Root cause

Likely the server did not require a CSRF token or validate the Origin/Referer header for the profile picture deletion request.

Impact

An attacker could delete a logged-in user's profile picture without consent, affecting data integrity and user experience, though the impact is limited to that action.

What the attacker needed

Victim is logged in; victim clicks a link or button

How it was found

  1. Create a user account and set a profile picture.
  2. Navigate to the profile section and select the option to delete the profile picture.
  3. Intercept the HTTP request for deleting the profile picture using Burp Suite.
  4. Craft a malicious HTML form that sends a POST request to the vulnerable endpoint.
  5. Send the PoC to the victim (e.g., via email or embedding it in a malicious website).
  6. If the victim is logged in and clicks the submit button, their profile picture is deleted.

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 when a malicious website tricks your browser into sending a request to another site where you are logged in, without you intending to. Here, the attacker made a form that, when submitted, told the victim's account to delete its profile picture. The site did not check that the request really came from its own pages.

What is CSRF?

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

More by EL_cazad0r

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.