Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Security:Session fixation

From MoodleDocs
Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!


This page forms part of the Moodle security guidelines.

What is the danger?

"Session Fixation is an attack that permits an attacker to hijack a valid user session. (...) . The attack consists of obtaining a valid session ID (e.g. by connecting to the application), inducing a user to authenticate himself with that session ID, and then hijacking the user-validated session by the knowledge of the used session ID. The attacker has to provide a legitimate Web application session ID and try to make the victim's browser use it. (...) The session fixation attack is a class of Session Hijacking, which steals the established session between the client and the Web Server after the user logs in. Instead, the Session Fixation attack fixes an established session on the victim's browser, so the attack starts before the user logs in. " (OWASP - Session fixation)

How Moodle avoids this problem

What you need to do in your code

What you need to do as an administrator

See also