-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Fix valid remember-me token exposure to the second consequent request #47488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security] Fix valid remember-me token exposure to the second consequent request #47488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks correct to me.
2 requests come by at the same time with tokenA:
- the one that wins the race persists and sends back tokenB
- the other one accepts tokenA but doesn't send any cookie back, aka tokenB from req 1 stays in the cookie jar.
Unless I missed something, this still fixes the situation that @heiglandreas describes in #46760 while preventing a needless disclosure of the currently valid token to the 2nd request.
/cc @Seldaek in case you want to have a look.
I'm just worried that although this causes a possible security threat, the security disclosure process hasn't been followed appropriately. Please be more careful in the future.
src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentRememberMeHandlerTest.php
Outdated
Show resolved
Hide resolved
…the second consequent request Close symfony#42343 Fix symfony#46760
7e9f27c
to
62ceded
Compare
Thank you @zerkms. |
Throughout the last days I debugged some odd occurrences and was able to track them down to this PR. I will create a new issue for that so that we can track that accordingly. |
Close #42343
Fix #46760
#46760 PR together with a fix produces a security vulnerability when a malicious actor may get a new and valid remember me token if makes a request right after the legit user.