Skip to content
CSRF Write-up Beginner

How I Banned Any User for 24 Hours Using a Simple CSRF Attack

A self-ban feature lacked CSRF protection, allowing an attacker to force any logged-in user to ban their own account for 24 hours. The attacker could trick a victim into submitting a crafted form, resulting in a temporary denial of service.

medium.com

Published on medium.com

In one of my recent bug bounty hunts, I discovered a CSRF vulnerability that let me ban any logged-in user for 24 hours — even though the feature was intended only for users to ban themselves. All it took was a simple HTML file and a bit of social engineering.

TakiasSec, 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 self-ban request lacked a CSRF token or other anti-CSRF protection, so the server accepted requests from any origin.

Impact

An attacker could force a logged-in user to ban their own account for 24 hours, causing a temporary denial of service; the attack required the victim to open a malicious HTML file.

What the attacker needed

Victim is logged in; victim opens a malicious HTML file

How it was found

  1. Create two accounts: one attacker and one victim.
  2. Intercept the self-ban request using Burp Suite and send it to Repeater.
  3. Generate a CSRF proof-of-concept form using Burp's Engagement Tools and save it as an HTML file.
  4. Open the HTML file in a browser where the victim is logged in and submit the form.
  5. Check the victim's account to confirm it is banned for 24 hours.

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.

CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user intending to. Here, the 'self-ban' button could be triggered by any website, so an attacker could trick someone into banning themselves for a day.

What is CSRF?

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

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.