Cross-Site Request Forgery (CSRF) in snipe/snipe-it
Reported on
Nov 6th 2021
Description
Attacker is able to logout a user if a logged in user visits attacker website.
Impact
This vulnerability is capable of forging user to unintentional logout.
Test
Tested on Edge, firefox, chrome and safari.
Fix
You should use POST instead of GET.
To expand:
One way GET could be abused here is that a person (competitor perhaps:) placed an image tag with src="<your logout link>" ANYWHERE on the internet, and if a user of your site stumbles upon that page, he will be unknowingly logged out.
This is why it should be a POST with a @csrf token.
While this cannot harm a users account it can be a great annoyance and is aa valid CSRF.
Occurrences
As noted in the description. "While this cannot harm a users account it can be a great annoyance and is aa valid CSRF." As a maintainer of a few Laravel projects myself this is a simple fix. I dont see why you would not just take the 5min to do it. Either way no disrespect if you disagree but it is valid. Mark it as you wish. I won't be upset. You will see that laravel itself now uses a POST request for logout and not GET. See laravel-ui, laravel-breeze and laravel-jetstream for references. You can also find info on Laracasts forums and laravel issue tracker.
I am taking the time to fix it - but to call it a vulnerability is a bit much. This should have just been a GH issue.