Lack of CSRF token validation at server side
The application did not validate CSRF tokens on the server side for some requests, so CSRF protection was not applied application-wide. An attacker could craft requests that perform critical operations on behalf of a logged-in user.
- Disclosed after 10 months
Description: Gratipay is not validating csrf token at server side for few requests. So csrf protection is not implemented application wide.
Proof of concept (Video):https://drive.google.com/file/d/0B8z7y7DxxQbwUHY4YTduYzMxbnc/view?usp=sharing
Recommended Fix: For CSRF Protection:
- Each critical operation request must be accompanied with a "token"
•Token is:
- Long, Random, not repeated for application lifetime.
- Unique per session or even per operation
- Part of URL in GET
- Hidden Field in POST (forms)
- Attacker cannot know / predict this token and hence cannot create requests to exploit the operation.
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 server did not verify the CSRF token for certain state-changing requests, leaving those endpoints unprotected.
Impact
An attacker could perform critical operations on behalf of a logged-in user, though the report does not specify which operations or whether any defence limited the attack.
What the attacker needed
Victim is logged in; victim visits attacker page
The fix
The server should require and validate a long, random, unpredictable CSRF token for every critical operation, unique per session or operation, included in GET URLs and POST forms.
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.
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 knowing. The site should check a secret token with each request to confirm it came from its own pages. Here, some requests skipped that check, so an attacker could trigger actions as the victim.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.