How I Discovered a $700 CSRF Vulnerability and Recreated It as a
The profile update endpoint accepted requests based solely on the session cookie, without a CSRF token, origin check, referer validation, or SameSite cookie attribute. An attacker could trick a logged-in user into submitting a forged request that modified their profile information.
Published on medium.com
Cross-Site Request Forgery (CSRF) is one of those vulnerabilities that often appears simple in theory but can have serious consequences when discovered in real applications. During testing, I encountered a CSRF issue in a profile update functionality that allowed user information to be modified without verifying the…
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
The server trusted the session cookie alone and did not verify that the request originated from the legitimate application.
Impact
An attacker could modify a victim's profile information, and this could potentially be chained with a password reset flow to take over the account.
What the attacker needed
Victim is logged in; victim visits attacker-controlled page
The fix
The application should implement multiple defensive layers: SameSite cookie policies, CSRF tokens, and Origin/Referer validation.
How it was found
- Generate a CSRF proof-of-concept request targeting the profile update endpoint.
- Test the request while authenticated in the application.
- Observe that the malicious request successfully triggered the profile update action.
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.
When you log into a website, your browser stores a cookie that proves who you are. If the site only checks for that cookie and not whether the request came from its own pages, another website can make your browser send a request that changes your profile without you knowing. This is called cross-site request forgery.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.