Skip to content
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

Incomplete fix to secure session store CVE-2019-16782 #145

Closed
biinari opened this issue May 12, 2023 · 0 comments · Fixed by #146
Closed

Incomplete fix to secure session store CVE-2019-16782 #145

biinari opened this issue May 12, 2023 · 0 comments · Fixed by #146

Comments

@biinari
Copy link
Contributor

biinari commented May 12, 2023

#125 switches to using the new ActionDispatch::Session::AbstractSecureStore but it does not change the key used to store sessions in redis. This means that there is still potentially a timing attack that could be used against looking up a session.

We should use the Rack::Session::SessionId#private_id as the key in redis storage and #public_id in the cookie.

It would seem reasonable to fallback to using the #public_id for sessions that have not yet been converted to use the #private_id for their key.

rails/activerecord-session_store#151 could be used for inspiration.

I've submitted on a PR for this and tested it out on our app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant