The vulnerability is a mass assignment issue within FlowiseAI's server, specifically affecting the creation and updating of 'Evaluator' and 'Evaluation' entities. The root cause lies in the use of Object.assign(entity, body) without a proper allowlist of fields. This allowed an authenticated attacker to overwrite security-sensitive, server-managed properties, most notably workspaceId, by including them in the JSON request body.
By manipulating the workspaceId, an attacker could move an evaluator they control into any other workspace, breaking workspace isolation and leading to a cross-workspace data takeover. The vulnerability existed in multiple functions:
EvaluatorDTO.toEntity: This method directly contained the unsafe Object.assign call, making any function that used it (like createEvaluator and updateEvaluator) vulnerable.
createEvaluation: This function had its own instance of the same vulnerable Object.assign pattern.
The patch addresses this by introducing a stripProtectedFields utility function. This function removes a list of protected fields (id, workspaceId, createdDate, etc.) from the request body before Object.assign is called. Additionally, the code was updated to explicitly set the workspaceId from a trusted, server-side source rather than the request body, ensuring proper data isolation is maintained.