[medium] OIDC links accounts by email across different sub values #11

Closed
opened 2026-10-18 15:51:55 +00:00 by jfro · 0 comments
Owner

Severity: medium
Affects: main

File: oidc_controller.ex:207-214
No user for provider+sub, but a user with the same email and provider 'oidc' exists → logged in as that user. No email_verified check. On an IdP where users can set their email, that's account takeover.
Fix: match on provider+sub only; if you keep email linking, require user_info["email_verified"] == true.


Found by Nye's audit, 2026-10-18 (static review of main @1d89af4 and jtk/ebook-management @43a849e).

**Severity:** medium **Affects:** main File: oidc_controller.ex:207-214 No user for provider+sub, but a user with the same email and provider 'oidc' exists → logged in as that user. No email_verified check. On an IdP where users can set their email, that's account takeover. Fix: match on provider+sub only; if you keep email linking, require user_info["email_verified"] == true. --- _Found by Nye's audit, 2026-10-18 (static review of main @1d89af4 and jtk/ebook-management @43a849e)._
jfro closed this issue 2026-10-18 17:45:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/fuzzy_catalog#11
No description provided.