fof/oauth: FriendsOfFlarum OAuth: Unauthenticated account takeover via unverified email trust in Discord OAuth provider
What fixes it
- 1.7.4fof/oauth, composerGitHub
composer require "fof/oauth:^1.7.4" - 2.0.0-beta.4fof/oauth, composerGitHub
composer require "fof/oauth:^2.0.0-beta.4" - 1.7.4fof/oauth, PackagistOSV
composer require "fof/oauth:^1.7.4" - 2.0.0-beta.4fof/oauth, PackagistOSV
composer require "fof/oauth:^2.0.0-beta.4"
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Impact
An unauthenticated account takeover vulnerability exists in fof/oauth when the Discord OAuth provider is enabled.
Discord allows an account to use an unverified email address when its phone number has been verified. During OAuth authentication, Discord may return that email address with "verified": false.
Affected versions of fof/oauth did not validate this flag and passed the email address to Flarum core as trusted via provideTrustedEmail(). Flarum core could then match the trusted email address to an existing user, link the attacker-controlled Discord identity to that user, and authenticate the attacker as the victim.
An attacker who knows a user's email address can therefore take over the corresponding Flarum account without knowing its password or requiring any interaction from the victim. This includes administrator accounts.
Preconditions for exploitation
- Discord sign-in is enabled on the forum.
- The victim has a Flarum account with a known email address.
- The victim's email address is not already associated with a Discord account.
- The attacker creates or configures a Discord account using the victim's email address without verifying it and verifies a phone number instead.
- The attacker authenticates to the forum using that Discord account.
The issue is specific to Discord's ability to return an unverified email address through OAuth. Other bundled providers were not confirmed to be practically exploitable through the same method because they only return verified or confirmed email addresses in the relevant authentication flow.
Patched Versions
Workarounds
Administrators who cannot update immediately should disable the Discord OAuth provider in the extension settings.
Credits
Reported by @faran1512
Text from GitHub Advisory Database
Affected versions 56
- fof/oauth, composer< 1.7.4GitHub
- fof/oauth, composer>= 2.0.0-beta.1, < 2.0.0-beta.4GitHub
- oauthaffected: < 1.7.4CVE List
- oauthaffected: >= 2.0.0-beta.1, < 2.0.0-beta.4CVE List
- fof/oauth, Packagistfrom first release, fixed in 1.7.4OSV
- fof/oauth, Packagist0.1.0OSV
- fof/oauth, Packagist0.2.0OSV
- fof/oauth, Packagist0.2.1OSV
- fof/oauth, Packagist0.3.0OSV
- fof/oauth, Packagist1.0.0OSV
- fof/oauth, Packagist1.0.1OSV
- fof/oauth, Packagist1.0.2OSV
- fof/oauth, Packagist1.1.0OSV
- fof/oauth, Packagist1.1.1OSV
- fof/oauth, Packagist1.2.0OSV
- fof/oauth, Packagist1.2.1OSV
- fof/oauth, Packagist1.2.2OSV
- fof/oauth, Packagist1.2.3OSV
- fof/oauth, Packagist1.2.4OSV
- fof/oauth, Packagist1.2.5OSV
- fof/oauth, Packagist1.3.0OSV
- fof/oauth, Packagist1.3.1OSV
- fof/oauth, Packagist1.3.2OSV
- fof/oauth, Packagist1.4.0OSV
- fof/oauth, Packagist1.4.1OSV
- fof/oauth, Packagist1.4.2OSV
- fof/oauth, Packagist1.4.3OSV
- fof/oauth, Packagist1.4.4OSV
- fof/oauth, Packagist1.5.0OSV
- fof/oauth, Packagist1.5.1OSV
- fof/oauth, Packagist1.5.2OSV
- fof/oauth, Packagist1.5.3OSV
- fof/oauth, Packagist1.5.4OSV
- fof/oauth, Packagist1.6.1OSV
- fof/oauth, Packagist1.6.10OSV
- fof/oauth, Packagist1.6.11OSV
- fof/oauth, Packagist1.6.12OSV
- fof/oauth, Packagist1.6.13OSV
- fof/oauth, Packagist1.6.14OSV
- fof/oauth, Packagist1.6.16OSV
- fof/oauth, Packagist1.6.2OSV
- fof/oauth, Packagist1.6.3OSV
- fof/oauth, Packagist1.6.4OSV
- fof/oauth, Packagist1.6.5OSV
- fof/oauth, Packagist1.6.6OSV
- fof/oauth, Packagist1.6.7OSV
- fof/oauth, Packagist1.6.8OSV
- fof/oauth, Packagist1.6.9OSV
- fof/oauth, Packagist1.7.0OSV
- fof/oauth, Packagist1.7.1OSV
- fof/oauth, Packagist1.7.2OSV
- fof/oauth, Packagist1.7.3OSV
- fof/oauth, Packagistfrom 2.0.0-beta.1, fixed in 2.0.0-beta.4OSV
- fof/oauth, Packagist2.0.0-beta.1OSV
- fof/oauth, Packagist2.0.0-beta.2OSV
- fof/oauth, Packagist2.0.0-beta.3OSV
References 7
- github.com/FriendsOfFlarum/oauth/commit/baca3466b3b7be51c70a7e0ba966901aefeb344aFixvia CVE List
- github.com/FriendsOfFlarum/oauth/commit/bb4bf376832e6bb68c579715d2a4b5a92c4a2567Fixvia CVE List
- github.com/FriendsOfFlarum/oauth/releases/tag/1.7.4Fixvia CVE List
- github.com/FriendsOfFlarum/oauth/releases/tag/2.0.0-beta.4Fixvia CVE List
- github.com/FriendsOfFlarum/oauth/security/advisories/GHSA-g7vj-c29h-3h5mAdvisoryvia CVE List
- github.com/advisories/GHSA-g7vj-c29h-3h5mAdvisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-92161Referencevia GitHub