Summary
During first profile completion, an authenticated SportEase user can supply a class ID without the application checking that the user belongs to that class. The application may grant the user that class's representative role, exposing roster information and allowing changes to competition-team assignments for the selected class.
Affected context
The issue affects profile completion in SportEase when an authenticated account has is_profile_complete=false and submits a class ID to PUT /api/user/profile for a class in the active event. AuthHandler.UpdateProfile accepts the selected class without verifying legitimate membership and assigns the corresponding representative role during first completion. Downstream handlers limit access to that selected class, but the granted role cannot be revoked through the exposed API.
Exploit preconditions
- Attack surface: The profile update API for the active event
- Required access: An authenticated account with an incomplete profile
- Trigger point: First profile completion through
PUT /api/user/profile - Why exploitation is possible: The submitted class ID is not checked against the user's legitimate class membership before the corresponding representative role is assigned
Why this happens
The profile update flow treats a client-supplied class identifier as sufficient authority to assign a class-specific representative role. This is an authorization flaw involving a user-controlled key, mapping to CWE-639: Authorization Bypass Through User-Controlled Key. The role assignment also reflects improper privilege management: the application grants a privilege without verifying that the user is entitled to it.
Potential impact
- The user may view roster information, including email addresses, for the selected class.
- The user could add or remove competition-team assignments for that class.
- The representative privilege may persist because it cannot be revoked through the exposed API.
- The impact is bounded to the selected class by downstream access checks.
General mitigation guidance
Defensive patterns include deriving class membership from trusted server-side records rather than accepting it from profile input, and authorizing every role assignment against the user's verified membership. Treat client-provided identifiers as references, not proof of permission, and apply least privilege when assigning representative roles. Provide a supported mechanism to revoke or correct role assignments, with auditability for privilege changes.
How teams detect issues like this
Review profile-completion code for role assignments based directly on client-supplied identifiers, especially where membership checks are absent or occur after privilege changes. Test authorization policies to confirm users can only select classes they are legitimately assigned to, and that role changes are recorded and revocable. Static analysis and policy checks can flag user-controlled identifiers flowing into authorization or role-assignment logic.

