Skip to content
CSRF Write-up Intermediate

From Minor Glitches to Major Wins: How I Chained CSRF and IDOR fo

The user update API lacked CSRF protection and proper authorization checks, allowing an attacker to force a logged-in victim to change any user's email address. By chaining these flaws, an attacker could take over accounts, including admin accounts, via password reset.

Akash Ghosh Follow

Published on osintteam.blog

The target was a mid-sized SaaS platform, heavily reliant on APIs for its core functionality. Initial reconnaissance revealed a solid security posture — no glaring issues like SQL injection, open admin panels, or misconfigured headers.

Akash Ghosh, on osintteam.blog

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 API endpoint lacked both anti-CSRF tokens and server-side authorization checks to verify the requesting user owned the target user ID.

Impact

An attacker could take over any user account, including administrators, leading to unauthorized access, impersonation, and privilege escalation.

What the attacker needed

Victim is logged in; victim clicks a link or button; attacker knows target user ID

The fix

The API should include anti-CSRF tokens on sensitive forms and enforce proper authorization checks to ensure users can only modify their own accounts.

How it was found

  1. Craft a CSRF proof-of-concept form that sends a POST request to the user update endpoint with a target user ID and attacker email.
  2. Trick a logged-in victim into submitting the form, which updates the target user's email to the attacker's address.
  3. Initiate a password reset for the target user, receiving the reset link in the attacker's inbox.
  4. Use the reset link to set a new password and take over the account.

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 into sending a request they didn't intend, like changing their email. An IDOR flaw lets someone change a user ID in a request to modify another person's data. Together, an attacker could make a victim unknowingly change someone else's email to the attacker's, then reset the password to take over that account.

What is CSRF?

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

More by Akash Ghosh

View all

8 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.