Bug Description
Study session join links use auto-incrementing numeric IDs (e.g., /session/42). An attacker can enumerate all sessions by iterating integers, joining private sessions without an invitation.
Steps to Reproduce
- Create a private session and note its ID (e.g.,
15).
- Try accessing
/session/14, /session/13, etc.
- Observe: other users' private sessions are accessible.
Root Cause
The sessions table uses SERIAL or BIGSERIAL as the primary key and exposes that integer directly in the join URL.
Impact
Unauthorized access to private peer-learning sessions; exposure of session content to uninvited participants.
Proposed Fix
ALTER TABLE sessions ADD COLUMN public_id UUID
DEFAULT gen_random_uuid() NOT NULL UNIQUE;
Use public_id (UUID) in all join URLs and API routes instead of the integer primary key.
Bug Description
Study session join links use auto-incrementing numeric IDs (e.g.,
/session/42). An attacker can enumerate all sessions by iterating integers, joining private sessions without an invitation.Steps to Reproduce
15)./session/14,/session/13, etc.Root Cause
The sessions table uses
SERIALorBIGSERIALas the primary key and exposes that integer directly in the join URL.Impact
Unauthorized access to private peer-learning sessions; exposure of session content to uninvited participants.
Proposed Fix
Use
public_id(UUID) in all join URLs and API routes instead of the integer primary key.