Repository navigation
Description
Summary
Any authenticated user can fetch any other user's profile — including their email address and verification status — by guessing or observing their UUID. There is no check that the requester shares a workspace with the target user, or that the target is even discoverable to them.
Details
- File:
api/app/app/modules/users/router.py - Lines: 36–47
@router.get("/{user_id}", response_model=UserResponse)
def get_user(
user_id: UUID,
db: Session = Depends(get_db),
current_user: User = Depends(get_current_user),
) -> UserResponse:
user = get_user_by_id(db, user_id)
if not user:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="User not found")
return to_user_response(user)The only authorization check is get_current_user (i.e. "is logged in as someone"). There is no comparison against current_user.id, and no check that user_id shares a workspace with current_user.
UserResponse (api/app/app/modules/users/schemas.py:22-33) includes:
class UserResponse(BaseModel):
id: UUID
email: str
username: str
...
email_verified: bool = FalseSo the response leaks the target's email address and whether it's verified.
Impact
Any authenticated user (including a newly self-registered one) can enumerate other users' email addresses given only their UUIDs — which are visible in board owner fields, comment authors, workspace member lists, etc. This is a straightforward PII-harvesting vector and a step toward more targeted attacks (e.g. combined with the OAuth account-linking issue).
Fix
- Add an authorization check: only allow returning full
UserResponse(with email) whenuser_id == current_user.id. - For other users, either:
- Require that
current_usershares at least one workspace withuser_id, and/or - Return a reduced public profile shape without
email/email_verified(e.g. id, username, display_name, avatar_url only).
- Require that
Acceptance criteria
-
GET /api/users/{user_id}no longer returns another user'semail/email_verifiedunless the requester shares a workspace with them (or a reduced public shape is used for cross-workspace lookups) - Regression test: user A (no shared workspace with user B) cannot retrieve user B's email via this endpoint
Activity
SankeerthNara commentedon Jul 10, 2026
Could you assign this to me
nazarli-shabnam commentedon Jul 10, 2026
Good luck working on the issue @SankeerthNara !
fix: gate email/verification fields on GET /api/users/{user_id} behin…
test: add regression tests for workspace-gated user profile access (D…
Merge pull request #40 from SankeerthNara/main