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.
- 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.

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

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>
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
- Open a project and modify the weekly contribution.
- Send the request to save the modified value.
- 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.