Listen to this Post
The OAuth callback handler in Authorizer links incoming OAuth identities to existing accounts matched by email address without verifying that the existing account’s email was verified by its original owner. An attacker who pre-registers with a victim’s email address (without verifying it) gains persistent password-based access to the victim’s account after the victim completes a normal OAuth login. Verified against HEAD (commit 73679fa).
How CVE-2026-XXXXX Works
In internal/http_handlers/oauth_callback.go, when an OAuth login occurs for an email that already exists in the database, the handler performs the following actions:
– Line 125: The existing user is looked up by email: `existingUser, err := h.StorageProvider.GetUserByEmail(ctx, refs.StringValue(user.Email))`
– Line 164: The OAuth user object is replaced with the existing user: `user = existingUser`
– Lines 173–176: The OAuth provider is appended to the existing user’s signup methods: signupMethod := existingUser.SignupMethods; if the provider isn’t already present, it is appended
– Lines 179–181: If the existing account’s email was not verified, it is automatically verified: `if user.EmailVerifiedAt == nil { now := time.Now().Unix(); user.EmailVerifiedAt = &now }`
– Line 219: The merged user is saved to the database: `user, err = h.StorageProvider.UpdateUser(ctx, user)`
At no point is the existing account’s password invalidated or the owner notified that a new OAuth identity was linked.
Attack Chain
- Attacker signs up with `[email protected]` using email/password, sets a known password, but does not click the email verification link. The account exists in the database with
EmailVerifiedAt = nil. - Later, the real owner of `[email protected]` logs in via Google OAuth.
- The OAuth callback at line 125 finds the attacker’s existing account by email.
- At line 164, the Google OAuth identity is linked to the attacker’s account.
- At lines 179–181, the email is automatically verified (the attacker never verified it, but now it’s marked as verified).
- At line 175, “google” is appended to the signup methods. The account now has both “basic_auth” and “google” as valid login methods.
- The attacker’s original password remains valid in the database—never cleared, changed, or invalidated.
- The attacker logs in with `[email protected]` and the password they originally set, gaining full access to the victim’s account, including any data the victim added via their Google session.
Why This Is Zero-Click
The victim performs no unusual action—they simply log in via their Google account, which is expected, secure behavior. The attacker staged the account beforehand and gains access without any further interaction.
This is a classic Account Linking vulnerability (cited in OWASP authentication guidelines). The core logic flaw is a trust boundary violation. Authorizer correctly trusts that Google has verified the email address, but it incorrectly extends that trust to validate the password set by the unverified attacker. The attacker maintains persistent, password-based backdoor access even if the victim later revokes Authorizer’s OAuth access from their Google account settings.
DailyCVE Form:
Platform: Authorizer
Version: < 0.0.0-20260329085140-6d9bef1aaba3
Vulnerability: Account Linking
Severity: Critical
Date: 2026-08-14
Prediction: 2026-08-21
What Undercode Say:
Check if your Authorizer instance is vulnerable Verify the commit hash of your running instance git rev-parse HEAD If your commit is 73679fa or earlier, you are vulnerable Upgrade to a patched version go get github.com/authorizerdev/authorizer@latest
// Vulnerable code in internal/http_handlers/oauth_callback.go
existingUser, err := h.StorageProvider.GetUserByEmail(ctx, refs.StringValue(user.Email))
if err == nil {
user = existingUser
// No check for EmailVerifiedAt before linking
if user.EmailVerifiedAt == nil {
now := time.Now().Unix()
user.EmailVerifiedAt = &now // Automatically verifies unverified accounts
}
}
Exploit: (Educational Purposes!)
Step 1: Attacker pre-registers with victim's email
curl -X POST https://authorizer.example.com/signup \
-d '{"email":"[email protected]","password":"attacker123"}'
Step 2: Attacker does NOT verify the email
Step 3: Victim logs in via Google OAuth (normal action)
Step 4: Attacker logs in with the pre-set password
curl -X POST https://authorizer.example.com/login \
-d '{"email":"[email protected]","password":"attacker123"}'
Session token returned — full account access achieved
Protection:
- Before linking an OAuth identity to an existing account, verify that the existing account’s email is already verified:
existingUser, err := h.StorageProvider.GetUserByEmail(ctx, refs.StringValue(user.Email)) if err == nil { if existingUser.EmailVerifiedAt == nil { // Reject the login or create a new separate account return errors.New("unverified account cannot be linked") } } - When linking a new OAuth identity, invalidate any existing password on the account or require the user to re-authenticate via the original method.
- Upgrade to a patched version of Authorizer (commit after 73679fa).
Impact:
- Full account takeover for any user who logs in via OAuth
- Attacker maintains persistent password-based access even after the victim changes OAuth providers
- All data the victim creates after OAuth login is accessible to the attacker
- The victim has no indication their account was pre-staged
- Affects every OAuth provider configured in Authorizer (Google, GitHub, Facebook, Apple, LinkedIn, Twitter, Discord, Twitch, Roblox, Microsoft)
Credit: Koda Reef
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

