The vulnerability is a mass assignment issue in FlowiseAI's tool management endpoints. An authenticated attacker could modify protected, server-controlled properties of a tool, such as its workspaceId, by sending a crafted request to the PUT /api/v1/tools/{toolId} endpoint. This could lead to a tool being reassigned to a different workspace, breaking tenant isolation.
The root cause lies in the updateTool function within the tools controller (packages/server/src/controllers/tools/index.ts). This function was accepting the entire request body (req.body) and passing it directly to the toolsService.updateTool function. The service layer would then merge these user-provided fields into the database entity, including fields that should not be user-modifiable.
The patch addresses this by implementing an explicit allowlist in the updateTool controller function. Instead of passing the whole request body, it now creates a new toolBody object and only copies over specific, permitted fields (name, description, color, iconSrc, schema, func) from the request. This prevents malicious or unintended modification of protected properties like workspaceId, createdDate, and updatedDate. A similar fix was applied to the createTool function to prevent the same vulnerability during tool creation. The updateTool function in the service layer also received a defense-in-depth fix to explicitly set the workspaceId from the authenticated session, preventing it from being overridden by the request body.