Summary
Trigger.dev improperly trusts a Google profile email during account linking without requiring Google's email_verified assertion. An attacker-controlled, unverified profile with a matching email may cause its Google identity to be attached to an existing account, potentially enabling account takeover.
Affected context
The issue occurs in Trigger.dev's Google authentication flow when a Google profile email is used to locate an existing email-based account. Risk arises when the application links the new Google authentication identifier to that account before confirming that Google has verified ownership of the email address. Deployments that support Google sign-in and account linking are most relevant.
Exploit preconditions
- Attack surface: Google OAuth authentication and account-linking flow
- Required access: Ability to initiate authentication with an attacker-controlled Google profile
- Trigger point: Processing a Google profile whose email matches an existing account
- Why exploitation is possible: The flow accepts the profile email without enforcing Google's
email_verifiedassertion and may attach the attacker-controlled authentication identifier to the matched account
Why this happens
The underlying bug is an authentication trust-boundary failure. The application treats an identity-provider-supplied email address as sufficient evidence of account ownership, rather than requiring a verified assertion and securely binding the external identity to the correct local account. This behavior maps to CWE-287: Improper Authentication, because account access may be granted or linked without adequately validating the identity claim.
Potential impact
- An attacker could gain access to an existing user account
- Session data, project information, or workflow configurations may be exposed
- The attacker could modify workflows, credentials, or account settings
- Connected services or organizational resources could be accessed or altered
- The compromised account could be used for further phishing or supply-chain abuse
General mitigation guidance
Mitigation typically focuses on treating email addresses as identifiers rather than proof of account ownership.
Common defensive patterns include:
- Require and validate the identity provider's verified-email assertion before account linking
- Bind external authentication identifiers only after completing explicit ownership checks
- Avoid automatically merging accounts based solely on matching email strings
- Require reauthentication or user confirmation for sensitive account-linking operations
- Apply least privilege to sessions, service integrations, and account-management actions
- Log and review authentication-linking events for anomalous changes
These controls reduce the risk of unauthorized identity association while preserving secure federated login behavior.
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis and code review searches for account linking based only on provider email fields
- Checks that OAuth or OpenID Connect flows validate
email_verifiedor an equivalent provider assertion - Review of branches that update authentication identifiers on existing accounts
- Tests covering unverified, missing, changed, and mismatched email claims
- Policy enforcement requiring explicit verification before merging external identities
- Monitoring for unexpected changes to authentication providers or identifiers on established accounts
Automated security review tools may help flag identity-linking logic that lacks verification or confirmation controls.

