FlowiseAI Cross-Workspace Assistant Takeover via Mass Assignment
FlowiseAI is vulnerable to a mass assignment vulnerability in the Assistant controller/service allowing an attacker, authenticated as a member of one workspace, to move an assistant (including configurations, instructions, tools and credentials) to another workspace by overwriting the `workspaceId` and `id` fields in the request body, leading to cross-workspace data takeover and IDOR.
FlowiseAI versions 3.1.1 and earlier are vulnerable to a mass assignment vulnerability in the Assistant controller located in packages/server/src/services/assistants/index.ts. An authenticated user can exploit this vulnerability to move an assistant, including its configuration, instructions, attached tools, and credentials, from one workspace to another. The vulnerability stems from the use of Object.assign(entity, body) without proper input validation, allowing a malicious actor to overwrite the workspaceId and id attributes of the Assistant entity. This issue is similar to a previously patched vulnerability in the DocumentStore (commit 840d2ae), highlighting a pattern of insecure mass assignment within the application. This vulnerability can lead to cross-workspace data access and privilege escalation.
Attack Chain
- An attacker authenticates to FlowiseAI as a member of workspace A, obtaining a valid session cookie or JWT.
- The attacker creates (or reuses) an existing assistant within workspace A and notes the assistant’s
id. - The attacker crafts a malicious
PUTrequest to the/api/v1/assistants/<id>endpoint. - The
PUTrequest includes a JSON body containing aworkspaceIdattribute set to the UUID of workspace B (the target workspace). - The FlowiseAI server receives the request and calls
Object.assign(updateEntity, body)within the Assistant controller. - The
workspaceIdin the request body overwrites the existingworkspaceIdof the assistant entity. - The persistence layer updates the assistant record in the database, associating it with workspace B.
- The assistant is now accessible to members of workspace B, and the attacker in workspace A loses access.
Impact
This vulnerability allows any authenticated user with permission to update an assistant to move it to another workspace, violating workspace isolation. Given that workspace UUIDs are easily enumerated via the API, an attacker can readily target specific workspaces. Successfully moving an assistant grants the destination workspace access to the assistant’s configuration, instructions, attached tools, and credentials, potentially leading to unauthorized access to sensitive data and resources. This issue is classified as high severity because it breaks a fundamental security boundary within the application.
Recommendation
- Upgrade FlowiseAI to a version higher than 3.1.1 to incorporate the fix described in PR https://github.com/FlowiseAI/Flowise/pull/6128.
- Deploy the Sigma rule
Detect FlowiseAI WorkspaceId Mass Assignmentto your SIEM to identify potential exploitation attempts. - Implement regression tests as described in the advisory to prevent future occurrences of this type of vulnerability; ensure requests containing
workspaceId,id,createdDate, orupdatedDateare rejected on both create and update paths.
Detection coverage 2
Detect FlowiseAI WorkspaceId Mass Assignment
highDetects attempts to modify the workspaceId via the /api/v1/assistants endpoint in FlowiseAI, indicating potential exploitation of the mass assignment vulnerability.
Detect FlowiseAI Assistant ID Mass Assignment
highDetects attempts to modify the assistant ID via the /api/v1/assistants endpoint in FlowiseAI, potentially indicating exploitation of the mass assignment vulnerability.
Detection queries are available on the platform. Get full rules →