intermediateSession Management: Timeout, Concurrency & Fixation

What is a session fixation attack, and how does Spring Security prevent it by default?

It's an attack where an attacker gets the victim to authenticate under a session ID the attacker already knows (planted beforehand), letting the attacker reuse that same ID to appear as the authenticated victim. Spring Security defaults to changeSessionId(), issuing a fresh session ID immediately upon successful authentication, so any pre-login session ID an attacker might have set up becomes useless after login.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

What is a session fixation attack, and how does Spring Security prevent it by default?

Next Step

Continue to What's required to make maximumSessions() work correctly?← Back to all Spring Security questions