spring-projects / spring-projects/spring-security

Duplicate pre-auth Session Id same as of already logged in user

Open
#16,961 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Describe the bug
Spring Security framework has, assigned an identical(duplicate) pre-auth session ID to a user that was same as previously registered for another user. This results in the session ID already existing and matching the session ID from the client, leading to session attributes being copied to the new session without triggering any of the source code of project related to session management. Consequently, the project source code logic for handling the session is bypassed

To Reproduce
It is sporadic issue and there is no specific way to reproduce the issue. But it is occuring nearly when more than 20 users are attempting to login.

Expected behavior
Spring security should not assign the same pre-auth session id as of already logged in user.

Sample*
From application log it is evident that User "17" logged in with session id ending with 0EF

Image

After User 18 attempts to log in, they are assigned a pre-auth session ID identical to User 17's, ending with 0EF. This session ID then changes to one ending with 5BA. Consequently, both User 18 and User 17 communicate with the backend using the same session ID, bypassing the project's source code exception related to session management.

Attached is an image of the application logs that provide proof of this issue during User 18's login.

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points. Start by building a reproducible scenario around more than 20 concurrent logins and use the attached logs to trace pre-auth and session-management behavior. Done means duplicate pre-auth session IDs are no longer assigned to different users and the session-management logic is not bypassed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.