Flowise - Cross-Workspace Information Disclosure via chatflows/apikey Endpoint
Description
Flowise before 3.1.2 contains an information disclosure vulnerability in the /api/v1/chatflows/apikey/:apikey endpoint. When the keyonly query parameter is omitted (the default), the endpoint returns not only the chatflows bound to the supplied API key but also all chatflows across every workspace that have no API key assigned, because the underlying query lacks any workspace filter. An attacker with a valid API key for one workspace can therefore retrieve the full ChatFlow configuration (including flowData with system prompts and node configurations, chatbotConfig, apiConfig, and credential IDs) of unprotected chatflows belonging to other workspaces.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
flowisenpm | < 3.1.2 | 3.1.2 |
Affected products
1Patches
Vulnerability mechanics
Root cause
"Missing workspace filter in the database query allows an API key holder to retrieve unprotected chatflows from all workspaces."
Attack vector
An attacker who possesses a valid API key for any workspace can call `/api/v1/chatflows/apikey/:apikey` without the `keyonly` query parameter [ref_id=1]. The endpoint returns not only the chatflows bound to that key but also all chatflows across every workspace that have no API key assigned, because the underlying query lacks a workspace filter [CWE-863]. The response includes the full `ChatFlow` entity, exposing `flowData` (system prompts, node configurations, custom code), `chatbotConfig`, `apiConfig`, and credential IDs in `textToSpeech`/`speechToText` fields [ref_id=1]. No authentication beyond the API key itself is required, and the endpoint is whitelisted.
Affected code
The vulnerability resides in `packages/server/src/controllers/chatflows/index.ts:90-107` and `packages/server/src/services/chatflows/index.ts:223-245`. The `getChatflowByApiKey` service builds a query that, when the `keyonly` parameter is omitted, adds `OR` clauses (`cf.apikeyid IS NULL` or `cf.apikeyid = ''`) without any workspace filter, causing the endpoint to return unprotected chatflows from every workspace.
What the fix does
The advisory recommends adding workspace scoping to the `getChatflowByApiKey` query by passing the API key's workspace ID and filtering the `OR` clause so that unprotected chatflows are only returned when they belong to the same workspace as the API key [ref_id=1]. Specifically, the fix changes the `orWhere` condition to `(cf.apikeyid IS NULL OR cf.apikeyid = :empty) AND cf.workspaceId = :workspaceId`, which prevents cross-workspace leakage. The patch does not show the exact diff, but the advisory's recommended code snippet is the authoritative guidance.
Preconditions
- authThe attacker must have a valid API key for any workspace in the Flowise deployment.
- configThe target chatflows must have no API key assigned (apikeyid IS NULL or empty).
- inputThe attacker must send a request to /api/v1/chatflows/apikey/:apikey without the keyonly query parameter.
Generated on Jun 23, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
3- github.com/FlowiseAI/Flowise/security/advisories/GHSA-c2c9-mfw7-p8hwghsavendor-advisoryWEB
- github.com/advisories/GHSA-c2c9-mfw7-p8hwghsaADVISORY
- www.vulncheck.com/advisories/flowise-cross-workspace-information-disclosure-via-chatflows-apikey-endpointmitrethird-party-advisory
News mentions
0No linked articles in our index yet.