GHSA-FHXM-XXCX-G6X3
Broken access control in GET /api/v1/organizationuser leaks the organization owner's password hash to any member (privilege escalation/account takeover)
CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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 · -30 d desde divulgación | |
| Divulgación | Publicada | GHSA-FHXM-XXCX-G6X3 divulgada · CVSS 6 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
A broken-access-control flaw in `GET /api/v1/organizationuser` allows any authenticated organization member including the lowest-privilege "member" role with empty permissions ([]) to retrieve the organization owner's full User entity including the owner's bcrypt password hash (credential) and `tempToken/tokenExpiry`. The route enforces no permission check (unlike the `POST/PUT/DELETE` verbs on the same router) and the backing service attaches the org owner's record without scrubbing secret fields that its sibling methods strip. A member can obtain the owner's password hash for offline cracking, leading to takeover of the highest-privileged account in the organization. This finding is related to CVE-2025-58434 but is a distinct, separately-exploitable vulnerability, a different endpoint (`GET /api/v1/organizationuser`), a different code path (`readOrganizationUserByUserId`) and an additional access-control defect (no permission check on the route, no requester-organization scoping) that CVE-2025-58434's fix did not address. Where CVE-2025-58434 exposed a reset tempToken, this path additionally exposes the owner's bcrypt credential hash to any authenticated member. The sanitizeUser scrub introduced by that advisory was not applied to this method.
Details
There are 2 issues:
- No authorization on the read route. In `packages/server/src/enterprise/routes/organization-user.route.ts`, the GET handler (line 9) is registered with no `checkPermission` and no c`heckFeatureByPlan`, while the `POST/PUT/DELETE` handlers on the same router (lines 11/13/15) all require `checkPermission('users:manage')`. Any authenticated session reaches the read.
- Unscrubbed owner entity. The controller (`organization-user.controller.ts:35, userId branch at ~68-69`) passes the request's userId straight into `readOrganizationUserByUserId` with no scoping to the requester's own organization. That service method (`organization-user.service.ts:158`) re-fetches the organization owner's full User record via `readUserById` and assigns it raw to user.user (`lines ~179-181`). The sibling methods `readOrganizationUserByOrganizationId (lines ~115-117)` and `readOrganizationUserByOrganizationIdRoleId (lines ~148-150)` explicitly delete the `credential`, `tempToken`, and `tokenExpiry` fields before returning, this method does not. The owner-attach loop makes it worse than a self-read even when a member queries their own userId, the response contains the owner's secrets.
For contrast, `GET /api/v1/workspaceuser` (same query parameters) returns records with no user object and no credential confirming the leak is specific to the organization-user owner-attach path.
Confirmed present in flowiseai/flowise:3.1.2 and on current main.
### PoC
Reproduced on a local self-hosted enterprise instance (multi-member orgs require an enterprise/cloud license; testing was confined to a locally licensed instance, as the policy does not authorize cloud testing). Requests carry the `x-request-from: internal` header that the UI sends on API calls.
1. Owner A completes organization setup (`/organization-setup`), creating org `AcmeOrg` and the owner account `ownerA@example.com`.
<img width="1912" height="950" alt="1" src="https://github.com/user-attachments/assets/2641843e-4ff3-4182-8091-872886f41f5d" />
<img width="1911" height="985" alt="2" src="https://github.com/user-attachments/assets/5a706864-1f73-416b-bf68-ba4b1cfbd150" />
2. As A, create an org role `ws-member` with a single non-admin permission (e.g. `chatflows:view`) at `/roles`.
<img width="1910" height="978" alt="3" src="https://github.com/user-attachments/assets/2289e2e2-73e5-4184-a689-206198bbeada" />
3. As A, invite `memberB@example.com` via User Management > Invite User, assigning workspace Default Workspace and role `ws-member`. B is created with organization role `member` (`org permissions []`).
<img width="1915" height="980" alt="4" src="https://github.com/user-attachments/assets/86913198-05ae-4dc1-bdc5-905cdbf8a123" />
<img width="1915" height="974" alt="5" src="https://github.com/user-attachments/assets/3467c543-9b72-4b6a-b327-d824a32a0bf8" />
4. Member B completes onboarding through the real invite link `http://<host>/register?token=<inviteToken>` (the token is normally delivered to the invitee by email, SMTP was unconfigured in the test instance, so it was read from the local DB as a stand-in, it is B's own onboarding token). B sets a password and logs in, B's session shows `isOrganizationAdmin:false`, org role `member`.
<img width="1256" height="52" alt="6" src="https://github.com/user-attachments/assets/04273b2b-eb8d-4e93-a07d-9f924c6b9645" />
<img width="1919" height="995" alt="7" src="https://github.com/user-attachments/assets/e7d1b03f-f22f-4b95-b51b-0c5cc2e3ab89" />
<img width="1919" height="984" alt="8" src="https://github.com/user-attachments/assets/08797d78-a4d8-43e9-85a7-ff4f457b8a6b" />
<img width="1915" height="974" alt="9" src="https://github.com/user-attachments/assets/c028a9c5-c5cb-48a9-9690-234ddc5ec4f3" />
<img width="1919" height="988" alt="10" src="https://github.com/user-attachments/assets/8c6e59d4-3d73-4553-b0a7-8d2daa7cc2f8" />
- As member B, send:
GET /api/v1/organizationuser?userId=<B's own userId> HTTP/1.1
Host: <host>
x-request-from: internal
Cookie: token=<B's session token>The HTTP 200 response contains the owner's User object:
[{ "isOrgOwner": false, "userId": "<B's id>",
"user": { "email": "ownerA@example.com",
"credential": "$2a$10$bKrwB/b/XlvUzmTOSQZ80e7a4f4rI9CC/18c8KG5xtQLOtQzgZd/.",
"tempToken": null, "tokenExpiry": "..." } }]<img width="1915" height="866" alt="11" src="https://github.com/user-attachments/assets/df012397-f798-4870-be7c-b3b52c7da240" />
<img width="1912" height="782" alt="12" src="https://github.com/user-attachments/assets/4d41c590-3061-4de2-a5b8-15920378c464" />
<img width="1911" height="784" alt="13" src="https://github.com/user-attachments/assets/b7446587-d8de-414d-a35a-ff17c315fc3e" />
<img width="1912" height="782" alt="14" src="https://github.com/user-attachments/assets/979d4764-4662-4338-8f63-9f4bf66baecd" />
<img width="1914" height="784" alt="15" src="https://github.com/user-attachments/assets/5c8afdc1-cec2-4932-a93b-9e164d69dca1" />
<img width="1880" height="780" alt="image" src="https://github.com/user-attachments/assets/bfa6e882-a25a-4322-907b-c561e4180bd2" />
<img width="1880" height="783" alt="image" src="https://github.com/user-attachments/assets/b1f2b6a9-f026-4055-863e-e3ca772eea14" />
Querying `?userId=<owner A's id>` returns the same credential. Negative controls: the same GET with no session cookie > 401, B issuing `POST /api/v1/organizationuser` or `POST /api/v1/role` > 403 (B holds no management permission), confirming the read route is the only unguarded verb.
### Impact
Broken access control leading to sensitive-data exposure (CWE-862, CWE-639, CWE-200) which in turn leads to privilege escalation. Any authenticated organization member with the lowest-privilege role obtains the organization owner's bcrypt password hash without victim interaction and without even needing the owner's user id (a self-id query returns the owner). The hash is crackable offline, weak or reused owner passwords yield full takeover of the highest-privileged account in the organization. The response also returns `tempToken/tokenExpiry` unscrubbed; for any target with a live `tempToken` (active password reset or pending invite) the same response discloses it, enabling tokenless account takeover via the password-reset flow not demonstrated here, as the test owner held no active token. Additionally, the route applies no requester-organization scoping so on multi-tenant deployments (Flowise Cloud/shared enterprise) a member of one organization could retrieve owners of other organizations by enumerating user ids a cross-tenant exposure inferred from the code path, not exercised in the single-org test.
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 | -30 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-fhxm-xxcx-g6x3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
