Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-70474 — flowise

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-863 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Flowise: Cross-Workspace OAuth2 Credential Metadata Leak

Summary

Three OAuth2 credential endpoints look up credentials by id alone with no workspaceId filter. Two of these endpoints (callback, refresh) are whitelisted from all authentication. This allows:

1. Cross-workspace credential access — Any authenticated user can initiate OAuth2 flows against credentials belonging to other workspaces.

2. Unauthenticated token injection — An unauthenticated attacker can forge OAuth2 callbacks to overwrite tokens in any credential.

3. Unauthenticated token refresh — An unauthenticated attacker can refresh tokens for any credential.

Root Cause

Vulnerable code: no workspace scoping

All three OAuth2 handlers query the Credential table by id only:

packages/server/src/routes/oauth2/index.ts:80-82 (authorize)

```typescript

const credential = await credentialRepository.findOneBy({

id: credentialId

// Missing: workspaceId filter

})

```

packages/server/src/routes/oauth2/index.ts:183-185 (callback)

```typescript

const credential = await credentialRepository.findOneBy({

id: state as string

// Missing: workspaceId filter

})

```

packages/server/src/routes/oauth2/index.ts:314-316 (refresh)

```typescript

const credential = await credentialRepository.findOneBy({

id: credentialId

// Missing: workspaceId filter

})

```

Correct pattern (same codebase)

The standard credential service correctly enforces workspace isolation:

packages/server/src/services/credentials/index.ts:130-132

```typescript

const credential = await appServer.AppDataSource.getRepository(Credential).findOneBy({

id: credentialId,

workspaceId: workspaceId // <-- Workspace scoping present

})

```

Authentication bypass via whitelist

packages/server/src/utils/constants.ts:40-41

```typescript

export const WHITELIST_URLS = [

// ...

'/api/v1/oauth2-credential/callback', // line 40

'/api/v1/oauth2-credential/refresh', // line 41

// ...

]

```

packages/server/src/index.ts:223-225 — prefix-matched whitelist skips all auth:

```typescript

const isWhitelisted = whitelistURLs.some((url) => req.path.startsWith(url))

if (isWhitelisted) {

next() // No JWT verification, no API key check

}

```

Attack Scenarios

Scenario A: Cross-Workspace Credential Metadata Leak

An authenticated user in Workspace A initiates an OAuth2 authorize flow for a credential belonging to Workspace B. The server returns an authorization URL containing the victim credential's client_id, scope, and redirect_uri.

```

POST /api/v1/oauth2-credential/authorize/<VICTIM_CREDENTIAL_UUID>

Cookie: connect.sid=<ATTACKER_SESSION>

```

Response:

```json

{

"success": true,

"credentialId": "<VICTIM_CREDENTIAL_UUID>",

"authorizationUrl": "https://provider.com/oauth2/authorize?client_id=LEAKED_CLIENT_ID&scope=LEAKED_SCOPE&...",

"redirectUri": "https://flowise-instance/api/v1/oauth2-credential/callback"

}

```

Scenario B: Unauthenticated Token Injection via Forged Callback

The callback endpoint requires no authentication and uses the state parameter as the credential lookup key. An attacker who controls an OAuth2 provider (or MitMs the flow) can inject arbitrary tokens into any credential.

```

GET /api/v1/oauth2-credential/callback?code=ATTACKER_AUTH_CODE&state=<VICTIM_CREDENTIAL_UUID>

(No authentication required)

```

The server exchanges the code at the credential's accessTokenUrl, and whatever tokens the provider returns are encrypted and stored into the victim's credential record (line 271):

```typescript

await credentialRepository.update(credential.id, {

encryptedData, // Contains attacker-controlled token data

updatedDate: new Date()

})

```

Scenario C: Unauthenticated Token Refresh

An attacker can refresh any credential's OAuth2 tokens without authentication. The server reads the stored refresh_token, exchanges it at the accessTokenUrl, and returns fresh token metadata.

```

POST /api/v1/oauth2-credential/refresh/<VICTIM_CREDENTIAL_UUID>

(No authentication required)

```

Response:

```json

{

"success": true,

"credentialId": "<VICTIM_CREDENTIAL_UUID>",

"tokenInfo": {

"access_token": "new-access-token-value",

"token_type": "Bearer",

"expires_in": 3600,

"has_new_refresh_token": false,

"expires_at": "2026-04-13T12:00:00.000Z"

}

}

```

The fresh access_token is returned directly in the response body (line 393-401), giving the attacker a valid OAuth2 token for whatever service the victim credential is connected to.

Proof of Concept

Prerequisites

  • A running Flowise instance with at least two workspaces (Workspace A and Workspace B)
  • An OAuth2 credential configured in Workspace B (the victim)
  • The credential UUID of the victim credential (obtainable by any member of Workspace B, or via IDOR — see Finding 4)

Step 1 — Confirm unauthenticated refresh endpoint is reachable

```bash

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. Rated impact: confidentiality high, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Attack requirements: Present — the target has to be in a particular state for the attack to work.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-70474 is classified as CWE-863: Incorrect Authorization. An authorisation check runs but reaches the wrong conclusion, permitting actions it should refuse.

Affected software

CVE-2026-70474 is recorded against 2 packages.

  • flowise
  • unknown

Timeline and source

Published on 4 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Package)
github.com (Web)

Other advisories for this package

flowise has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-863: Incorrect Authorization) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
CWE CWE-863
Public Exploit ✅ No
Source NVD
Published 2026-08-04
Updated 2026-08-20
Modified 2026-08-04
Fix URL N/A

Affected Packages

Software From version Fixed in
flowise
unknown

Similar Threats

Site Security Check

Is flowise part of your stack?

CVE-2026-70474 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026