Using the cookie-setting SameSite=strict causes links from other domains to not send cookies on the first request. This causes Laravel to create a new session with a new identifier, but the old session data cookie is left, and passed on every request.
Follow a few links like that (or reload the page after following a link) and the number of cookies increases, until the server will start rejecting the requests due to the header size (exactly when depends on the server settings, but around 10 times is enough for me).

400 Bad Request (Request Header Or Cookie Too Large)
SESSION_DRIVER=cookie in .env'same_site' => 'strict' in config/session.phpA very similar issue exists for the 'lax'-setting, which I suppose is more common (and default in Chrome 80). Normal links are fine, but POST-requests to your page does not include cookies and will cause the same issue.
I do understand that the same problem has always existed if the laravel_session cookie, which points to the actual session data cookie, is deleted and the page is reloaded. The difference here is that this issue affects users unwittingly and that browser defaults have changed.
I have a very brief understanding of how the session cookies function in Laravel and how they are set, and I do understand that it is impossible to clean up data after the pointer is lost. However, one solution could be to name the data-cookie in a specific way, for instance laravel_session_data_SESSIONID, instead of just SESSIONID, such that dangling data can be deleted, or to always use the same cookie name for the data, since the data store is not shared between users.
I guess the reason that laravel_session is just a pointer is to be more generic and behave the same way for all session drivers, but in the case of cookies, couldn't the data be stored directly on that cookie (saving data on every request)?
I'm not sure where all those cookies come from. Unfortunately I don't have time to deep dive into this so appreciating it if anyone can help out here.
Thanks for responding.
A cookie with the session data is always created when the cookie driver is used. The SameSite setting strict or lax may cause the cookie to not be sent, even though it exists and is kept in the browser for future requests. Laravel has no way of knowing this and responds with a new data-cookie (with a new random name).
If no cookies aren't sent then Laravel will not have any way to determine anything about old sessions. There is likely no solution to this and the answer is simply to use a different session driver such as database.
Personally I suggest using "lax". It would not be very typical for other sites to be making full POSTs to your domain anyways.
I agree @taylorotwell about 'lax'. It's quite disturbing though that a post-request to any site from anywhere causes the user on that site to be logged out (regardless of session driver), since Laravel can't see the session and generates a new.
I'll see if I can try out my ideas about the original problem some day. Here's three ideas to try if anyone else wants to look at it:
@taylorotwell I was able to reproduce both issues at nova.laravel.com, which uses the cookie driver.
Steps:
Since nova.laravel.com doesn't specify any SameSite-value, it relies on the default. This will be lax in future Chrome, and this new setting can be forced today by visiting chrome://flags and searching for 'lax'.
Chrome allows lax-cookies to be sent in a post-request for 2 minutes after creation, but after waiting these two minutes, the "attack" is successful.


It's not a big problem, I agree, just wanted to clarify that it has nothing to do with bad setup of Laravel (except for choice of session-driver).
I'm not sure what you want me to do. This is simply how cookies work with these settings 😄 ... if you don't like that behavior use a dfferent session driver.
Just to clarify, using "Strict" causes issues regardless of session driver, since all drivers keep id in a cookie.
For "lax", i'll think some more about my proposed solutions above, but I'm sure someone else will figure something better out :)
@taylorotwell Regarding your previous comment: _"It would not be very typical for other sites to be making full POSTs to your domain anyways."_
I agree, but today I realized that this is quite common using OAuth (access_token is sent back in a POST request). The solution is thankfully simple – to use an endpoint which does not use the StartSession middleware.
Most helpful comment
@taylorotwell I was able to reproduce both issues at nova.laravel.com, which uses the cookie driver.
Steps:
Since nova.laravel.com doesn't specify any SameSite-value, it relies on the default. This will be lax in future Chrome, and this new setting can be forced today by visiting chrome://flags and searching for 'lax'.
Chrome allows lax-cookies to be sent in a post-request for 2 minutes after creation, but after waiting these two minutes, the "attack" is successful.
It's not a big problem, I agree, just wanted to clarify that it has nothing to do with bad setup of Laravel (except for choice of session-driver).