Cross-Site Request Forgery (CSRF) in bytefury/crater

Valid

Reported on

Nov 21st 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="https://example.com/auth/logout" 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 a valid CSRF." As a maintainer of a few Laravel projects myself this is a simple fix. 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. There may be cases when this may be used in a multi-stage attack to first log someone out, then prompt them to log in on a spoofed page, thus stealing their credentials

We are processing your report and will contact the bytefury/crater team within 24 hours. a year ago
We have contacted a member of the bytefury/crater team and are waiting to hear back a year ago
We have sent a follow up to the bytefury/crater team. We will try again in 7 days. a year ago
We have sent a second follow up to the bytefury/crater team. We will try again in 10 days. a year ago
We have sent a third and final follow up to the bytefury/crater team. This report is now considered stale. a year ago
Mohit Panjwani validated this vulnerability a year ago
HDVinnie has been awarded the disclosure bounty
The fix bounty is now up for grabs
We have sent a fix follow up to the bytefury/crater team. We will try again in 7 days. a year ago
We have sent a second fix follow up to the bytefury/crater team. We will try again in 10 days. a year ago
We have sent a third and final fix follow up to the bytefury/crater team. This report is now considered stale. a year ago
Mohit Panjwani marked this as fixed in 6.0.4 with commit 2b7028 a year ago
Mohit Panjwani has been awarded the fix bounty
This vulnerability will not receive a CVE
to join this conversation