?
avatar creativeprogramming
creativeprogramming
13 Feb 2015

Issue #5214 is not fixed in Joomla 3. I'm sure of that. You cannot find the equivalent of its patch in Joomla 3 "refactored" JSession code.

Sadly I still cannot reproduce, but happened randomly so many times to confirm me that something is wrong. I'm still investigating to check what really causes this, I think it's related to empty session_id (expired) but not only, sometimes also new sessions seems to get a new random cookie that sometimes collides with an existing active session (most times is a session of a guest, e.g. bots but there is a fair probability to get a logged user session - in a week 3 users reported to me this, on a base of 10 users, they just are very active on the site and we have a good level of guest traffic, it happened also to me one time) session table is full of logged users with the same session id and the UA of bots, so i think bots got some logged user sessions too

For now i tell you that i solved this severe issue rewriting the commented code to do the check IP and check UA for the session.php https://github.com/joomla-framework/session/blob/master/Session.php#L945-975 as you can see those lines are dead code,

why it was commented? fix_adress (a consistent typo) is never enabled, but in the comments it's told to be a default-ON check, see here:
https://github.com/joomla-framework/session/blob/master/Session.php#L58-64

that's dumb, not in your code-style, that's indicates that someone in the pre-github Joomla code history partially removed that code, disabling it, but i cannot find any issue related to this, this indicates that there is some latent issue, some so long-living pending TODO, in a so important class as session handling, you're doing amazing work on Joomla, please bring attention also to this basic lass or security issues will make anti-marketing again

maybe we should restore fix_adress and fix_browser checks and make them configurable in the global Joomla configuration, they are useful also for extra security preventing real attacks for who want bank level security (session stickness to IP and UA to avoid cookie stealing)

Instead to avoid this auto-random session hijacking issue, that is due to a bug and not any attack, this is of course not the clean solution,I'm still investigating to check what is causing the issue, maybe md5 collision, maybe something wrong. Anyway it deserves attention for sure, please start investigating on this also you and keep open the ticked until you cant tell that session.php is clear

Another question I have: are you sure that guest users (non-logged) need a session_id? this increases probability of such collisions, maybe if you really need to have a session also for each guest we can make another session_name for them, to treat them apart, but i suggest to remove the session for guests, also for performance reason, the #_session table gets too big so quickly in mediumly active sites,

causing performance issues and corruption too, joomla needs to be the BEST SOLUTION to project also high traffic websites don't you think?

avatar creativeprogramming creativeprogramming - open - 13 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 13 Feb 2015
Labels Added: ?
avatar creativeprogramming creativeprogramming - change - 13 Feb 2015
Title
JSession is dumb, dead code + expired session_id randomly logged-in in other accounts (Joomla 3)
JSession is shady, dead code + expired session_id randomly logged-in in other accounts (Joomla 3)
avatar creativeprogramming creativeprogramming - change - 13 Feb 2015
Title
JSession is shady, dead code + expired session_id randomly logged-in in other accounts (Joomla 3)
JSession is shady, dead code + expired session_id causes a severe auto-random session hajacking that makes you logged-in as other people accounts (Joomla 3)
avatar creativeprogramming creativeprogramming - change - 13 Feb 2015
Title
JSession is shady, dead code + expired session_id causes a severe auto-random session hajacking that makes you logged-in as other people accounts (Joomla 3)
JSession is shady, dead code + expired session_id causes a severe auto/random session hijacking that makes you logged-in as another logged-in person (Joomla 3)
avatar creativeprogramming creativeprogramming - change - 13 Feb 2015
Title
JSession is shady, dead code + expired session_id causes a severe auto/random session hijacking that makes you logged-in as another logged-in person (Joomla 3)
JSession is shady, dead code + session_id auto/random session hijacking issue that makes you logged-in as another logged-in person (Joomla 3)
avatar zero-24 zero-24 - change - 13 Feb 2015
Title
JSession is shady, dead code + session_id auto/random session hijacking issue that makes you logged-in as another logged-in person (Joomla 3)
JSession is shady, dead code + session_id auto/random session hijacking issue that makes you logged-in as another logged-in person (Joomla 3)
avatar zero-24 zero-24 - change - 13 Feb 2015
Category Libraries
avatar brianteeman brianteeman - change - 25 Feb 2015
Labels Removed: ?
avatar brianteeman brianteeman - change - 25 Feb 2015
Labels Added: ?
avatar enesbil
enesbil - comment - 14 Mar 2015

I wrote a new little patch for this issue. It prevents empty sessions in Joomla 3.4:
#5214 (comment)

You can lower the probability for same session-ids, by configuring the following php runtime variables:
http://php.net/manual/en/session.configuration.php#ini.session.entropy-file
http://php.net/manual/en/session.configuration.php#ini.session.entropy-length

avatar creativeprogramming
creativeprogramming - comment - 15 Mar 2015

thanks @enesbil

avatar zero-24 zero-24 - change - 15 Mar 2015
Title
JSession is shady, dead code + session_id auto/random session hijacking issue that makes you logged-in as another logged-in person (Joomla 3)
JSession is shady, dead code + session_id auto/random session hijacking issue that makes you logged-in as another logged-in person (Joomla 3)
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-03-15 07:35:23
Closed_By zero-24
avatar zero-24
zero-24 - comment - 15 Mar 2015

Closing as we have a PR by @enesbil here: #6430


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6079.
avatar joomla-cms-bot
joomla-cms-bot - comment - 15 Mar 2015

Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/6079

avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2015
Closed_Date 2015-03-15 07:35:23 2015-03-15 07:35:24
avatar joomla-cms-bot joomla-cms-bot - close - 15 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - close - 15 Mar 2015
avatar creativeprogramming
creativeprogramming - comment - 23 Dec 2015

Guys, my issue was due to an nginx cache server in front of Joomla and guest session ids cached (but then not changed after user sign in): #8772

Add a Comment

Login with GitHub to post a comment