Skip to content

Account Takeover via Cross-Provider OAuth Email Matching in Google Login

High
carderne published GHSA-rp8c-h4xr-w9qv Jul 9, 2026

Package

npm trigger.dev (npm)

Affected versions

<= 4.5.1

Patched versions

>= 4.5.2

Description

Summary

The Google OAuth login handlers in apps/webapp/app/models/user.server.ts silently link an attacker's
OAuth credentials to an existing victim account when they share the same email address — with no ownership
verification. An attacker who has a Google account whose email matches a victim's trigger.dev account
(created via magic link or the other OAuth provider) is immediately granted an authenticated session as the victim
upon OAuth login, resulting in full account takeover.

Details

Affected file: apps/webapp/app/models/user.server.ts

Vulnerable functions:

  • findOrCreateGoogleUser() — called by addGoogleStrategy in googleAuth.server.ts

Vulnerable code (Google):

const existingUser = await prisma.user.findUnique({
  where: { authIdentifier },
});

const existingEmailUser = await prisma.user.findUnique({
  where: { email },           // "victim@company.com" → victim's account found
});

if (existingEmailUser && !existingUser) {
  const user = await prisma.user.update({
    where: { email },
    data: {
      authIdentifier
      authenticationProfile: authProfile,
      authenticationExtraParams: authExtraParams,
      avatarUrl,
    },
  });
  return { user, isNewUser: false };  // victim's User object returned → attacker gets their session
}

Root cause: When an OAuth login arrives for a Google identity that has never been seen before (!existingUser)
but whose email matches an existing account (existingEmailUser), the server unconditionally writes the attacker's
OAuth identifier into the victim's database record and returns the victim's user object. No confirmation email, no
re-authentication of the original account holder, and no check that the accounts belong to the same person is
performed.

PoC

Prerequisites:
- Victim has a trigger.dev account at victim@company.com created via magic link (no OAuth linked)
- Attacker controls a Google account with victim@company.com as a verified (or even primary unverified) email

Steps:
1. Attacker navigates to the trigger.dev instance and starts Google OAuth login
2. Completes the Google flow using the victim@company.com Google account
3. Server processes the callback in findOrCreateGoogleUser:
  - authIdentifier = "google:ATTACKER_ID"  no match (existingUser = null)
  - email = "victim@company.com"  victim's account found (existingEmailUser set)
  - Enters if (existingEmailUser && !existingUser) branch
  - prisma.user.update(...) writes authIdentifier = "google:ATTACKER_ID" to victim's record
  - Returns victim's user object
4. Remix Auth creates a session with userId = victim.id
5. Attacker is redirected to the dashboard, fully logged in as the victim

The same attack works with Google OAuth.

Impact

This is an Account Takeover vulnerability. Any trigger.dev user whose email address is also registered (as verified,
or potentially as unverified primary) on the attacker's Google account is at risk.

An attacker who exploits this gains:
- Full access to the victim's projects, tasks, runs, API keys, and environment variables
- Ability to create or revoke secret environment variables and API keys under the victim's identity
- Access to all organizations the victim belongs to
- Persistent access  the victim's original magic-link login method continues to work, making the compromise difficult
 to detect

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

CVE ID

CVE-2026-73655

Weaknesses

Improper Authentication

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. Learn more on MITRE.

Credits