Home page logo

fulldisclosure logo Full Disclosure mailing list archives

[Ruby on Rails] Move away from CookieStore if you care about your users and their security. Here is a technical explanation why.
From: "G. S. McNamara" <main () gsmcnamara com>
Date: Tue, 24 Sep 2013 21:30:58 -0400

Ruby on Rails Web applications versions 2.0 through 4.0 are by default
vulnerable to an oft-overlooked Web application security issue: Session
cookies are valid for life.* A malicious user could use the stolen cookie
from any authenticated request by the user to log in as them at any point
in the future.

The fix is to configure your Rails app to store most session information on
the server side in the database. Move away from the default CookieStore,
which stores the entire session hash in the cookie, to something like

Here is a full write-up if needed:

**In my testing, the only methods to invalidate these cookies are for the
user to change their password or for systems administrators to change the
application secret.*

G. S. McNamara
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]