Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Broken access control in GET /api/v1/organizationuser leaks the organization owner's password hash to any member (privilege escalation/account takeover)

Moderate
igor-magun-wd published GHSA-fhxm-xxcx-g6x3 Aug 28, 2026

Package

npm flowise (npm)

Affected versions

<= 3.1.3

Patched versions

3.1.4

Description

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 checkFeatureByPlan, 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.
1 2
  1. As A, create an org role ws-member with a single non-admin permission (e.g. chatflows:view) at /roles.
3 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 []`). 4 5
  1. 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.
6 7 8 9 10
  1. 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": "..." } }]
11 12 13 14 15 image image

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.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v4 base metrics

Exploitability Metrics
Attack Vector Network
Attack Complexity High
Attack Requirements None
Privileges Required Low
User interaction None
Vulnerable System Impact Metrics
Confidentiality High
Integrity None
Availability None
Subsequent System Impact Metrics
Confidentiality None
Integrity None
Availability None

CVSS v4 base metrics

Exploitability Metrics
Attack Vector: This metric reflects the context by which vulnerability exploitation is possible. This metric value (and consequently the resulting severity) will be larger the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable system. The assumption is that the number of potential attackers for a vulnerability that could be exploited from across a network is larger than the number of potential attackers that could exploit a vulnerability requiring physical access to a device, and therefore warrants a greater severity.
Attack Complexity: This metric captures measurable actions that must be taken by the attacker to actively evade or circumvent existing built-in security-enhancing conditions in order to obtain a working exploit. These are conditions whose primary purpose is to increase security and/or increase exploit engineering complexity. A vulnerability exploitable without a target-specific variable has a lower complexity than a vulnerability that would require non-trivial customization. This metric is meant to capture security mechanisms utilized by the vulnerable system.
Attack Requirements: This metric captures the prerequisite deployment and execution conditions or variables of the vulnerable system that enable the attack. These differ from security-enhancing techniques/technologies (ref Attack Complexity) as the primary purpose of these conditions is not to explicitly mitigate attacks, but rather, emerge naturally as a consequence of the deployment and execution of the vulnerable system.
Privileges Required: This metric describes the level of privileges an attacker must possess prior to successfully exploiting the vulnerability. The method by which the attacker obtains privileged credentials prior to the attack (e.g., free trial accounts), is outside the scope of this metric. Generally, self-service provisioned accounts do not constitute a privilege requirement if the attacker can grant themselves privileges as part of the attack.
User interaction: This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable system. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner.
Vulnerable System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the VULNERABLE SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the VULNERABLE SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the VULNERABLE SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
Subsequent System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the SUBSEQUENT SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the SUBSEQUENT SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the SUBSEQUENT SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
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

CVE ID

No known CVE

Weaknesses

No CWEs

Credits