Skip to content
CSRF Disclosed report Beginner

The contribution save option seem to be vulnerable to CSRF

The researcher suspected that the weekly contribution save endpoint lacked CSRF protection because the CSRF token appeared in a cookie rather than a header or parameter. However, the report was a false positive, as the application does validate an X-CSRF header.

roshanpty Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in 1 hour
  • Disclosed after 17 hours

Summary by the researcher

Gratipay validates an X-CSRF header to prevent CSRF attacks. During my tests it weirdly did not append those headers and I presumed that it could be an implementation flaw which can further be leveraged to perform CSRF attacks. This was a false positive. Thanks to @nache_ for rightly pointing it out.

The report

The application is vulnerable to Cross Site Request Forgery

Description

The option in the application to save weekly contribution for a project is vulnerable to Cross Site Request forgery. Note: I am unable to perform the action itself normally. But it is obvious that the application uses no protection against CSRF and the token named csrf_token is being passed in the cookie instead of a post parameter or HTTP header.

Detailed Steps:

Step 1: Open a project and modify the weekly contribution for the same.

2016-07-16_17_50_20-Passwork_-_Gratipay.png
2016-07-16_17_50_20-Passwork_-_Gratipay.png From the original on HackerOne

Step 2: Send the request to save the modified value.

2016-07-16_17_51_39-Program_Manager.png
2016-07-16_17_51_39-Program_Manager.png From the original on HackerOne

Step 3: It can be observed that no kind of CSRF protection is employed and the request can be recreated in the following URL format. If anyone clicks on the link in a browser where they are already logged in to gratipay, the amount will be automatically updated. https://gratipay.com/<project>/payment-instruction.json?amount=<amount>

The original report as published on HackerOne, by roshanpty. 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 researcher's testing tool did not include the required X-CSRF header, leading to a false positive; the application actually validates this header.

Impact

The claimed impact (automatic update of contribution amount via a crafted link) was not real because the application does validate an X-CSRF header, making this a false positive.

What the attacker needed

Victim logged in to Gratipay; victim clicks a crafted link

How it was found

  1. Open a project and modify the weekly contribution.
  2. Send the request to save the modified value.
  3. Observe that no CSRF protection appears to be employed and the request can be recreated as a URL.

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.

Cross-site request forgery (CSRF) is when a malicious site tricks your browser into sending a request to another site where you are logged in, without your knowledge. This report claimed that a payment setting could be changed this way, but it turned out to be a mistake because the site does check a special header.

What is CSRF?

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

More by roshanpty

View all

7 more disclosed reports, best first.

More from Gratipay

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.