GHSA-JVX3-MJPW-R4GH
Missing authorization on Flowise upsert-history endpoints allows authenticated users and API keys to read and delete arbitrary document-store upsert history across workspaces
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 |
|---|---|---|---|
| Divulgación | Publicada | GHSA-JVX3-MJPW-R4GH divulgada · CVSS 7.7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
Flowise exposes `GET /api/v1/upsert-history/:id` and `PATCH /api/v1/upsert-history` without any route-level permission checks. The backing service also performs no workspace or ownership validation. It reads history rows by attacker-supplied `chatflowid` and deletes history rows by attacker-supplied UUID array only.
This is not a harmless metadata leak. `UpsertHistory` stores parsed `result` data and `flowData` snapshots for document-store upsert operations. `flowData` is built from embedding, record manager, and vector store node configurations, including per-node `paramValues`. As a result, an authenticated low-privilege user or API key can retrieve or delete arbitrary document-store upsert history outside their permission scope, and the lack of workspace scoping makes cross-workspace access possible whenever a target `chatflowId` is known.
### Details
I reviewed the current Flowise HEAD:
- Version: `3.1.1`
- Commit: `2555f10c11fcf0115b5fc2ff3230976abe462623`
- Verified date: `2026-04-07`
Relevant code paths:
- `packages/server/src/routes/upsert-history/index.ts`
- `router.get(['/', '/:id'], upsertHistoryController.getAllUpsertHistory)`
- `router.patch('/', upsertHistoryController.patchDeleteUpsertHistory)`
- neither route uses `checkPermission()` or `checkAnyPermission()`
- `packages/server/src/services/upsert-history/index.ts`
- `getAllUpsertHistory()` queries `UpsertHistory` only by attacker-controlled `chatflowid` and date range
- it does not receive or enforce `workspaceId`
- `patchDeleteUpsertHistory()` deletes rows by raw attacker-controlled `ids`
- it does not verify workspace membership, ownership, or any permission
- `packages/server/src/database/entities/UpsertHistory.ts`
- each history row stores `chatflowid`, `result`, and `flowData`
- `packages/server/src/utils/index.ts`
- `saveUpsertFlowData()` copies non-empty non-template input values into `paramValues`
- for document loaders it replaces uploaded file blobs with filenames, but otherwise keeps direct configuration values
- `packages/server/src/services/documentstore/index.ts`
- document-store upsert code persists `flowData` and `result` into `UpsertHistory`
- `flowData` is populated from embedding, record-manager, and vector-store node configs
- `packages/server/src/routes/documentstore/index.ts`
- adjacent document-store routes are protected with `documentStores:view`, `documentStores:update`, `documentStores:delete`, and `documentStores:upsert-config`
- this makes the missing protection on `/upsert-history` a clear authorization mismatch rather than an intentional absence of RBAC
- `packages/ui/src/routes/MainRoutes.jsx`
- document-store UI routes are also gated behind `RequireAuth permission={'documentStores:view'}`
- `packages/ui/src/views/chatflows/ShareChatbot.jsx`
- public chatbot sharing exposes `chatflowId` directly in `/chatbot/<chatflowId>` links
- `packages/ui/src/api/client.js`
- the official internal web client sends `x-request-from: internal`
- `packages/server/src/index.ts`
- requests with `x-request-from: internal` are authenticated via JWT
- other non-whitelisted `/api/v1` routes are authenticated via API key
This means:
- The official permission model clearly treats document-store data as protected.
- `/upsert-history` is still reachable by any authenticated internal user session or API key.
- The service does not scope reads or deletes to the caller's workspace.
- If a target `chatflowId` is known, the caller can read or delete another workspace's upsert history.
### Why cross-workspace access is practical
The service layer has no `workspaceId` filter at all, so the remaining practical question is target `chatflowId` discovery.
Flowise itself exposes public chatbot links in the form `/chatbot/<chatflowId>`. A public/shared chatbot therefore discloses a valid global `chatflowId` to anyone who sees the link. Any authenticated Flowise user in another workspace, or any valid Flowise API key from another workspace, can then call `/api/v1/upsert-history/<chatflowId>` and receive the victim workspace's upsert history because the backend does not re-check workspace ownership.
Even without public sharing, this issue should not depend on object ID secrecy for protection.
### PoC
Prerequisites:
- Victim workspace has a chatflow with document-store upsert history.
- Attacker has either:
- a normal authenticated Flowise user account, or
- any valid API key
- Attacker knows the victim `chatflowId`.
- one practical source is a public chatbot share link: `/chatbot/<victim_chatflow_id>`
Attack steps:
- Obtain a victim `chatflowId`.
Example public link:
https://<FLOWISE_HOST>/chatbot/11111111-2222-3333-4444-555555555555- Read the victim upsert history as an authenticated user:
GET /api/v1/upsert-history/11111111-2222-3333-4444-555555555555 HTTP/1.1
Host: <FLOWISE_HOST>
Cookie: accessToken=<USER_SESSION>
X-Request-From: internalAlternative with an API key:
GET /api/v1/upsert-history/11111111-2222-3333-4444-555555555555 HTTP/1.1
Host: <FLOWISE_HOST>
Authorization: Bearer <ANY_VALID_FLOWISE_API_KEY>Expected result:
- the response returns one or more upsert history rows for the victim chatflow
- each row includes parsed `result`
- each row includes parsed `flowData` with node labels, categories, ids, and `paramValues`
- Delete arbitrary history rows returned in step 2:
PATCH /api/v1/upsert-history HTTP/1.1
Host: <FLOWISE_HOST>
Content-Type: application/json
Cookie: accessToken=<USER_SESSION>
X-Request-From: internal
{
"ids": ["aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]
}Expected result:
- the specified history rows are deleted without any workspace or permission validation
### Impact
This is a broken access control issue with both confidentiality and integrity impact.
An attacker can:
- read document-store upsert history for arbitrary chatflows
- cross workspace boundaries if a foreign `chatflowId` is known
- retrieve `flowData` snapshots containing document-store pipeline configuration values and filenames recorded in `paramValues`
- retrieve `result` summaries for victim upsert operations
- delete arbitrary history rows, destroying audit and troubleshooting data
The confidentiality impact is significant because the affected data is not limited to counters or timestamps. The history detail path intentionally stores and returns structured configuration snapshots for embedding, record manager, vector store, and loader stages.
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 |
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-jvx3-mjpw-r4ghLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
