Skip to content
CSRF Write-up Beginner

My journey to find CSRF (Cross-Site Request Forgery )

The password change function did not require the current password and did not validate the CSRF token, allowing an attacker to change a victim's password via a forged request. The attacker could take over the account by tricking the victim into submitting a crafted form.

osamamohamed21212121 Follow

Published on medium.com

Hi, welcome back to another blog. In this blog, we’re going to know how I found my CSRF in the external program.

Osamamohamed (db3wy), 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 password change endpoint did not verify the current password and did not enforce CSRF token validation, allowing requests from any origin.

What the attacker needed

Victim is logged in; victim visits attacker's page

How it was found

  1. Find the forgot password function and observe that changing the password does not require the current password.
  2. Check that the Referer header can be set to an external domain and the request still succeeds.
  3. Intercept the password change request, manipulate or delete the CSRF token, and confirm the password still changes.
  4. Create an HTML page that automatically submits the password change request to the target.

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 CSRF (Cross-Site Request Forgery) attack tricks a logged-in user's browser into sending a request to a website without the user's knowledge. Here, the password change form lacked protection, so an attacker could make the victim's browser change the password to one the attacker knows, locking the victim out.

What is CSRF?

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

More by osamamohamed21212121

View all

6 more disclosed reports, 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.