Skip to content
CSRF Write-up Beginner

Easy Csrf Bypass

The profile update endpoint accepted requests with the anti-CSRF token parameter removed or sent blank, so the token check could be skipped. An attacker could make a logged-in victim submit a forged form that changed the victim's profile details, including their email address.

Khaledyassen Follow

Published on infosecwriteups.com

Today I want to talk about one of my findings in a private program at Hacker-One platform, which refers to it as target.com.

Khaledyassen, on infosecwriteups.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 treated a missing or empty anti-CSRF token as acceptable instead of rejecting the request.

Impact

An attacker could change a logged-in victim's profile details, including their email address, which could lead to account takeover; the report was triaged as medium severity.

What the attacker needed

Victim is logged in; victim opens attacker's link

The fix

The server should require a unique, secret, unpredictable anti-CSRF token on every state-changing request and reject requests where it is missing or blank.

How it was found

  1. Log in with valid credentials in the Firefox browser.
  2. Change something on the profile page.
  3. Intercept the request using Burp Suite Professional.
  4. Send the request to Repeater.
  5. Use the engagement tools in Burp to generate a CSRF proof of concept.
  6. Save the generated HTML as a file, send its link to the victim, and the profile details change when the victim opens it.

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 attack tricks a logged-in user's browser into sending a request the user did not intend, such as changing their profile. Sites normally stop this with a secret token that must accompany each change. Here the server did not properly check that token, so a page hosted by an attacker could submit the change on the victim's behalf.

What is CSRF?

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

More by Khaledyassen

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.