The vulnerability is an authorization bypass in Flowise, caused by improperly trusting the x-request-from: internal HTTP header. The main application middleware, located in packages/server/src/index.ts within the App.init method, checks for this header. If present, it proceeds to only verify the user's session (verifyToken) without performing any further authorization checks. This allows any authenticated user, regardless of their privileges, to access any API endpoint under /api/v1/ by simply adding the spoofed header to their request.
This analysis identified two key functions:
-
App.init (middleware): This is the root of the vulnerability. The code snippet from the advisory clearly shows the flawed logic. An attacker would trigger this function on every malicious request.
-
upsertVector: This function is an example of a privileged operation that becomes accessible through the bypass. The patch that adds a workspace ownership check (workspaceId !== req.user?.activeWorkspaceId) confirms that it was previously lacking proper authorization. An exploit targeting vector upsertion would cause this function to appear in a runtime profile.
By identifying both the entry point of the bypass and a function that becomes exploitable, we can effectively detect exploitation of this vulnerability.