The vulnerability is a mass assignment issue in FlowiseAI's variable management endpoints. The root cause is the use of Object.assign() in the createVariable and updateVariable controller functions (packages/server/src/controllers/variables/index.ts), which directly mapped user-provided JSON objects to database entities without proper input sanitization. This allowed authenticated users to overwrite protected, server-controlled properties like workspaceId, createdDate, and updatedDate.
Exploitation of this vulnerability allows an attacker to reassign a variable to any workspace by manipulating the workspaceId field in a PUT request to /api/v1/variables/{variableId}. This breaks tenant isolation in multi-workspace deployments.
The patch addresses this vulnerability at two levels:
- Controller Layer: The
Object.assign() calls in createVariable and updateVariable were replaced with an explicit allowlist, ensuring only permitted fields (name, value, type) can be modified by the user.
- Service Layer: As a defense-in-depth measure, the
updateVariable function in packages/server/src/services/variables/index.ts was modified to explicitly preserve the original workspaceId of a variable during an update, preventing any change to this field at the database level.
During exploitation, a runtime profiler would show calls to the updateVariable function in the controller, which in turn calls the updateVariable function in the service. Therefore, all identified functions are critical runtime indicators for this vulnerability.