The vulnerability is a mass assignment issue in the FlowiseAI chatflow update endpoint (PUT /api/v1/chatflows/{chatflowId}), allowing an authenticated user to modify server-controlled properties of a chatflow object. The analysis of the patch in commit 0d29e4d0dfa3119c4ace89f615340d40b0615c9e confirms the root cause.
The primary vulnerable function is updateChatflow located in packages/server/src/controllers/chatflows/index.ts. Before the patch, this function directly assigned the user-controlled request body to a ChatFlow entity using Object.assign(updateChatFlow, body). This allowed an attacker to inject and modify protected fields like workspaceId, isPublic, and deployed. The fix involves sanitizing the request body with a new stripProtectedFields utility before the assignment.
A similar vulnerability was proactively fixed in the saveChatflow function in the same file, which is responsible for creating chatflows.
Furthermore, a defense-in-depth fix was applied to the updateChatflow function within the service layer at packages/server/src/services/chatflows/index.ts. This change ensures that the workspaceId is always derived from a trusted source, preventing reassignment even if the initial sanitization were to fail. During an exploit, a runtime profile would show a call stack involving these identified functions.