open-webui/backend
Sasha Mitchell 785f95679a fix(oauth): require provider-verified email before merging accounts by email
The merge-by-email path bound a new (provider, sub) identity to an
existing account looked up by email claim alone, on both the OAuth
callback (utils/oauth.py) and the token-exchange endpoint
(routers/auths.py). An identity provider that lets users assert
arbitrary unverified email addresses could hand any matching account,
including admin accounts, to an attacker.

Track provider verification during email extraction (OIDC
email_verified claim in bool or string form, GitHub /user/emails
per-address verified flag) and refuse the merge when the provider
explicitly reports the email as unverified: the callback redirects
with the standard invalid-credentials error, and token exchange
returns 403. Providers that send no verification signal keep current
behavior.

Rebased and extended after #28191 was closed: the same merge-by-email
path exists in the token-exchange endpoint; this commit covers both.
2026-08-08 05:43:28 +07:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix(oauth): require provider-verified email before merging accounts by email 2026-08-08 05:43:28 +07:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh refac 2026-03-24 19:43:30 -05:00
requirements-min.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
requirements.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
start.sh refac 2026-06-17 03:01:11 +02:00
start_windows.bat refac 2026-06-17 03:01:11 +02:00