Git Product home page Git Product logo

Comments (5)

untitaker avatar untitaker commented on June 12, 2024

from iron-sessionstorage.

asakasa avatar asakasa commented on June 12, 2024

Sorry for the late reply.

If there is only vulnerability to attack session fixation, it is not too dangerous. The vulnerability, however, is too dangerous when other vulnerabilities are combined with it.

The flow example of how the attacker exploits is as follows:

  1. Attacker fixes malicious session to the victim's browser using some other vulnerabilities, such as XSS or HTTP header injection, etc. For example, the attacker fixes "iron_session_id=malicious" to the victims's browser.
  2. The victim will log in to the service with the malicious session (iron_session_id=malicious).
  3. Web service using RedisBackend stores the malicious session in associating with the victim authentication.
  4. Attacker log in to the service using the victim's session.

Of course, the presence of other vulnerabilities are inherently a critical flaw.

In many web services, a session is regenerated when an user logged in. So, how about this library also providing such a method?


Otherwise, if it is empty it will not be regenerated, so I think it's better to fix it preferentially.
https://github.com/iron/iron-sessionstorage/blob/master/src/backends/redis.rs#L93-L97

Thanks.

from iron-sessionstorage.

untitaker avatar untitaker commented on June 12, 2024

from iron-sessionstorage.

asakasa avatar asakasa commented on June 12, 2024

Ah, right. I didn't have that idea.

Surely it is sufficient for bug fix.
But the behavior is like to refresh a session rather than to clear a session, you know...

Even if you fix the bug using such a way, the vulnerability of Session Fixation is not gone.
I think that a best solution is to implement a method for specifiable a session id into RedisSession struct. But it is difficult to fix the vulnerability because some other implementations may be affected.

I think a countermeasure you suggested is good for temporary response.

Thanks.

from iron-sessionstorage.

untitaker avatar untitaker commented on June 12, 2024

I think it would make sense to automatically refresh the session if it is cleared, but yes, a new API for this would be good.

from iron-sessionstorage.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.