The vulnerability is a classic mass assignment issue in the FlowiseAI application, specifically within the assistant creation and update endpoints. The root cause lies in the use of Object.assign(entity, body) in the createAssistant and updateAssistant functions located in packages/server/src/services/assistants/index.ts. This code pattern directly copies all properties from the incoming request body to the database entity without an allowlist of permitted fields.
An attacker could exploit this by crafting a request that includes protected fields such as workspaceId or id. By manipulating the workspaceId, an authenticated user could move an assistant from a workspace they have access to, into any other workspace within the application, leading to a cross-workspace data takeover. The vulnerability is exacerbated by the fact that workspace UUIDs are easily enumerable.
The patch addresses this vulnerability by introducing a stripProtectedFields function. Instead of directly using the requestBody, the application now first sanitizes the input to remove any protected fields before using Object.assign. This ensures that only legitimate, user-modifiable fields are persisted, effectively mitigating the mass assignment vulnerability.