The vulnerability is a classic mass assignment issue in the FlowiseAI application, specifically within the dataset and dataset row management services. The core of the problem lies in the use of Object.assign(entity, body) in the createDataset, updateDataset, addDatasetRow, and updateDatasetRow functions located in packages/server/src/services/dataset/index.ts. This programming pattern blindly copies all properties from the user-controlled request body (body) into the database entity (entity).
An authenticated attacker could exploit this by crafting a request that includes protected properties like workspaceId or id. For instance, by sending a PUT request to update a dataset and including a different workspaceId in the JSON payload, the attacker could move the dataset to another workspace. This would expose the dataset to users of the target workspace and make it inaccessible from its original location, constituting a cross-workspace data takeover.
The patch addresses this vulnerability by replacing the unsafe Object.assign with an explicit property-by-property assignment (an allowlist approach). The fixed code only assigns values for fields that are meant to be user-modifiable (e.g., name, description), while ignoring any other malicious or unintended properties sent in the request. This ensures that critical, server-managed fields like workspaceId and id cannot be manipulated by the client, thus mitigating the mass assignment vulnerability.