Skip to content
CSRF Disclosed report Beginner

CSRF - Close Account

The account closure endpoint accepted POST requests without a CSRF token, so an attacker could make a logged-in victim submit a form that closed their account. The attacker only needed to host a page and get the victim to visit it.

ahmd_halabi Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 42 days
  • Disclosed after 50 days

Target Url ████/services/user/closeAccount

Summary: Hello, I found a Cross Site Request Forgery bug in the target endpoint on the POST request /█████/services/user/closeAccount which is critical because it can delete authenticated user account whenever he navigates to the attacker website or link.

Step-by-step Reproduction Instructions

  1. Navigate to your account █████████/#/login.
  2. Copy and paste the below code in an html file
<html>
 <!-- CSRF PoC - generated by Burp Suite Professional -->
 <body>
 <script>history.pushState('', '', '/')</script>
   <form action="████████/services/user/closeAccount" method="POST">
     <input type="submit" value="Submit request" />
   </form>
 </body>
</html>```

Open it in the browser, hit the button and your account will be closed.

Please see the attached video for a clear poc.
████████

## Suggested Mitigation/Remediation Actions
Add a csrf-token in the header or in an hidden input to check if the user that is doing this action authorized or not.

## Impact

This action is critical and sensitive. Attacker can upload this file to a url. Sends it to the victims. And when the authenticated victims navigate to the url their accounts will be deleted.

The original report as published on HackerOne, by ahmd_halabi. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint performed a state-changing action based only on the session cookie and did not require or validate a CSRF token.

Impact

An attacker could delete an authenticated victim's account if the victim visited a malicious page while logged in.

What the attacker needed

Victim is logged in; victim visits attacker page

How it was found

  1. Log in to the target site.
  2. Create an HTML file containing a form that posts to the closeAccount endpoint.
  3. Open the HTML file in a browser and submit the form.
  4. Observe that the logged-in account is closed.

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 report has not been written yet. The Original tab links to the source.

When you are logged in to a site, your browser automatically sends your session cookie with every request to that site. If a site does not check for a special secret token on sensitive actions, another website can quietly make your browser send that action for you. Here, visiting a malicious page could close your account without you meaning to.

What is CSRF?

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

More by ahmd_halabi

View all

12 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

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.