Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy 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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas left a comment
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 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…the second consequent requestClosesymfony#42343Fixsymfony#46760
7e9f27c to62cededComparenicolas-grekas commentedSep 8, 2022
Thank you@zerkms. |
heiglandreas commentedMar 7, 2024
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. |
Uh oh!
There was an error while loading.Please reload this page.
Close#42343
Fix#46760
#46760 PR together with a fix produces a security vulnerability when a malicious actor may get anew and valid remember me token if makes a request right after the legit user.