Skip to content

Legacy serverpod_auth Google sign-in: authenticateWithIdToken never checks email_verified #6058

Backlog

Description

@HusseinAdeiza

The legacy Google ID-token endpoint verifies iss and aud but never consults the token's email_verified claim, and resolves the account by the token's email (not the immutable sub). The legacy Apple and Firebase paths got exactly this gate in GHSA-m6hm-gg8r-43xx (unverified identities accepted); the newer Google module got its own fix in GHSA-3hrq-4vpw-386w (access tokens minted for a different client). The legacy Google ID-token path sits between both advisories and is covered by neither.

modules/legacy/serverpod_auth/serverpod_auth_server/lib/src/endpoints/google_endpoint.dart (verified against current main; authenticateWithIdToken appears at line 129, and no email_verified reference exists anywhere in the file)

Honest scoping note from the private thread: the team pointed out this needs a token that actually carries email_verified: false (or an address-state edge) for a mailbox the attacker does not control, and no such Google issuance path was demonstrated. This issue is therefore filed as belt-and-braces hardening in the same pattern as the m6hm fix, not as a demonstrated takeover.

Suggested hardening: reject tokens with email_verified == false (or resolve by sub and require a verified email), matching the Apple / Firebase fix.

Disclosed privately 2026-11-10; the security team confirmed the missing check and will address it as a hardening change. Opening here for the record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions