The vulnerability is a mass assignment issue within the dataset service of FlowiseAI, located in packages/server/src/services/dataset/index.ts. The root cause was the insecure use of Object.assign(entity, request.body) in the createDataset, updateDataset, addDatasetRow, and updateDatasetRow functions. This pattern allowed an attacker to overwrite any property on the Dataset or DatasetRow entities by simply including it in the JSON request body.
The primary exploit scenario involves an authenticated user manipulating the workspaceId of a DatasetRow. By sending a PUT request to update a row they own, they could include a different workspaceId in the request body. The Object.assign call would then overwrite the existing workspaceId, effectively transferring the row to another workspace, thus breaking workspace data isolation.
The patch in commit db40c5a952c1b1e9f22838ef15e4b19ed2d03514 remediates this by replacing the unsafe Object.assign calls with an allowlist approach. The new code explicitly assigns only the expected, safe fields (like name, description, input, output) from the request body to the entity, preventing any malicious or unintended property overwrites. Further hardening was done in subsequent commits to add more validation checks.