[security] high: cross-site request forgery on logout leads to execution of malicious scripts
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 776
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Reported by: Ethical Hacker
Vulnerable URL: https://gitcoin.co/logout/
Severity : Critical
We have found that there's no csrf protection placed on the logout feature which results in a successful malicious scripts execution on the victim. There is no CSRF protection so I can force any user from your site and execute malicious scripts on the victim using csrf on logout. An attacker could perform malicious attacks/inject malicious payloads on the user of your website by csrf poc using this vulnerability exploit.
### Proof of Concept
https://user-images.githubusercontent.com/7516920/143793313-c9f6dd36-0ba4-44d5-b6d2-7c9bba780cf1.mp4
### Vulnerability
```
history.pushState('', '', '/')
```
Attackers will be able to execute malicious scripts on the victim by injecting malicious scripts using this vulnerability exploit. Attackers will be able to chain with other vulnerabilities as well like cross site scripting attacks using this vulnerability exploit as attackers are able to perform this action on other users and also onto the other users PC. So attackers will be able to perform anything on other users' accounts and also onto the PC of any user.
More attackers will be able to chain this csrf issue with cross site scripting attacks by which attackers will be able to execute any command on the victim and onto the victim PC. As it's a GET request so attackers can execute XSS by using csrf exploit attack on this endpoint which will enable the victim PC hijack as well. More attackers can perform anything on the users/victim PC and also they can take over any account by performing a variety of attacks chaining with this vulnerability exploit.
- Malicious Code Execution
- Malicious Payloads Execution
- Victim PC Hijack
- Account Takeover
- Phishing
- Files Get Executed To The Victim PC
### Notes
Place Csrf token protection on this endpoint and the attacker will not be able to exploit your users using this attack/vulnerability.
Contributor guide
Assessment
This issue has not been assessed yet.