- Package
- fof/oauth
- Fixed in
- 1.7.4, 2.0.0-beta.4
- Published
- Fri 25 Sep 2026, 16:55 LisbonUpdated Mon 26 Oct 2026, 01:25 Lisbon
- Installs on Packagist
- 159K
In plain words
When Discord sign-in is enabled, affected versions of fof/oauth trust email addresses returned by Discord without checking whether they are verified. An attacker who knows an existing user's email address could take over that Flarum account, including an administrator account, without its password or any interaction from the victim. This requires the victim's email address not to be already associated with a Discord account and relies on Discord allowing unverified email addresses for phone-verified accounts.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| fof/oauth | < 1.7.4 | 1.7.4 |
| fof/oauth | >= 2.0.0-beta.1, < 2.0.0-beta.4 | 2.0.0-beta.4 |
Am I affected?
In composer.lock, find fof/oauth and check whether its version is below 1.7.4, or at least 2.0.0-beta.1 but below 2.0.0-beta.4. If so, check whether the Discord OAuth provider is enabled in the extension settings. Exploitation also requires a known email address belonging to an existing Flarum user that is not already associated with a Discord account. Fixed versions are 1.7.4 and 2.0.0-beta.4.
What to do
Check which version you have, then update to a fixed release for your branch (1.7.4, 2.0.0-beta.4):
composer show fof/oauth | grep versions
composer update fof/oauth
If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.
If you cannot update yet
If you cannot update immediately, disable the Discord OAuth provider in the extension settings.
The advisory's 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
Weakness: CWE-345 Insufficient Verification of Data Authenticity. Reported by faran1512.
The advisory
- GitHub Advisory Database: GHSA-g7vj-c29h-3h5m, with who is affected and how
- OSV.dev: GHSA-g7vj-c29h-3h5m
- The week's digest, with the other advisories from 21 Sep 2026
- All advisories for fof/oauth