NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2026-56268: Flowise: Cross-Workspace Chatflow Disclosure via chatflows/apikey Endpoint Returns All Unprotected Chatflows

mediumCVSS 4.0 5.3 · 3.1 7.7GHSA-c2c9-mfw7-p8hw

In Flowise 3.1.1 and earlier, the `/api/v1/chatflows/apikey/:apikey` endpoint returns every chatflow with no API key from all workspaces, not just the caller's. A user with any valid API key can read other workspaces' full chatflow configuration, including system prompts and node settings. Upgrade to flowise 3.1.2.

Published May 20, 2026 · Updated Jul 20, 2026 · Analysis Oct 26, 2026

What an attacker can do

The controller validates the API key, then calls getChatflowByApiKey in packages/server/src/services/chatflows/index.ts. When the keyonly query parameter is absent, which is the default, the query adds orWhere("cf.apikeyid IS NULL") and orWhere("cf.apikeyid = ''"). Neither clause has a workspaceId filter (CWE-863). The response is the full ChatFlow entity.

The attacker needs one valid API key for any workspace. They call the endpoint without keyonly and receive their own chatflows plus every unprotected chatflow in the system. Adding ?keyonly=true limits the output to the key's own flows, which shows the difference.

The exposed fields include flowData (the workflow graph with system prompts, model names, internal URLs and custom code), chatbotConfig with allowed origins, apiConfig, and the textToSpeech and speechToText settings with credential IDs. The advisory says those IDs can be abused through the TTS generate endpoint.

API keys are opt-in, so most chatflows have none, and in a multi-workspace deployment most of them are exposed. The harm is intellectual property and configuration disclosure across tenants. The advisory describes no write access.

Who is affected

The flowise npm package, version 3.1.1 and earlier, on deployments with more than one workspace or organization. A single-workspace install exposes nothing across a boundary. Check:

npm ls flowise

For Docker, read the version from the image tag. You can confirm the behavior on your own server by calling the endpoint with and without keyonly=true and comparing the workspaceId values returned.

flowise

Ecosystem
npm
Affected
<= 3.1.1
Fixed in
3.1.2
Check
npm ls flowise

How to fix it

Upgrade to flowise 3.1.2:

npm install [email protected]

The fix suggested in the advisory scopes the query by workspace. The OR clause for unprotected chatflows applies only to chatflows with the same workspaceId as the API key. The text I read does not show the exact code released in 3.1.2.

As a stopgap, the advisory's own test shows that callers who pass keyonly=true only get chatflows bound to their key. After upgrading, consider whether system prompts, custom code and credential IDs in other workspaces were exposed, and rotate any secrets they reference.

How to tell if you were hit

Check the server's access logs for requests to /api/v1/chatflows/apikey/ without keyonly, especially from keys that belong to a workspace with little reason to call it, or that call it repeatedly. In the database, check which API keys were used for these calls. Review the credential IDs referenced in textToSpeech and speechToText for use by callers outside their workspace. Rotate any credentials referenced by exposed flows.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The /api/v1/chatflows/apikey/:apikey endpoint (whitelisted, accessible with API key auth only) returns all chatflows bound to the provided API key AND all chatflows across the entire system that have no API key assigned. This crosses workspace boundaries, allowing a user in Workspace A who has a valid API key to read the full configuration (including flowData, chatbotConfig, system prompts, and node configurations) of chatflows from Workspace B, Workspace C, and all other workspaces, as long as those chatflows have no API key assigned.

Details

The controller at packages/server/src/controllers/chatflows/index.ts:90-107 validates the API key and calls the service:

const getChatflowByApiKey = async (req: Request, res: Response, next: NextFunction) => {
    try {
        const apikey = await apiKeyService.getApiKey(req.params.apikey)
        if (\!apikey) {
            return res.status(401).send("Unauthorized")
        }
        const apiResponse = await chatflowsService.getChatflowByApiKey(apikey.id, req.query.keyonly)
        return res.json(apiResponse)  // Returns full chatflow objects with flowData
    } catch (error) {
        next(error)
    }
}

The service at packages/server/src/services/chatflows/index.ts:223-245 builds the database query:

const getChatflowByApiKey = async (apiKeyId: string, keyonly?: unknown): Promise<any> => {
    const appServer = getRunningExpressApp()
    let query = appServer.AppDataSource.getRepository(ChatFlow)
        .createQueryBuilder("cf")
        .where("cf.apikeyid = :apikeyid", { apikeyid: apiKeyId })
    if (keyonly === undefined) {
        // When keyonly is not set (default), also return ALL chatflows with no API key
        query = query.orWhere("cf.apikeyid IS NULL").orWhere("cf.apikeyid = ''")
    }
    const dbResponse = await query.orderBy("cf.name", "ASC").getMany()
    return dbResponse  // Returns full ChatFlow entities including flowData
}

When keyonly is not provided as a query parameter (which is the default case), the query expands to include:

  • All chatflows bound to the provided API key (same workspace, expected behavior)
  • ALL chatflows with apikeyid IS NULL (any workspace, no workspace filter)
  • ALL chatflows with empty apikeyid (any workspace, no workspace filter)

There is NO workspaceId filter in this query. The response includes the full ChatFlow entity, which contains:

  • flowData - the complete workflow graph including system prompts, model names, internal URLs, custom code
  • chatbotConfig - chatbot configuration including allowed origins
  • apiConfig - API configuration and override settings
  • textToSpeech / speechToText - TTS/STT configuration including credential IDs
  • analytic - analytics configuration

PoC

# Step 1: Attacker has a valid API key for Workspace A
API_KEY="<attacker-workspace-a-api-key>"

# Step 2: Query the chatflows/apikey endpoint WITHOUT keyonly parameter
# Returns the attacker chatflows PLUS all chatflows without API keys from ALL workspaces
curl -s "http://localhost:3000/api/v1/chatflows/apikey/" | jq ".[].workspaceId"

# Step 3: With keyonly parameter, only chatflows bound to the API key are returned
curl -s "http://localhost:3000/api/v1/chatflows/apikey/?keyonly=true" | jq ".[].workspaceId"

Impact

  • Cross-Workspace Information Disclosure: A user in any workspace can read the full configuration of chatflows from all other workspaces that do not have an API key assigned. This breaks workspace isolation.
  • Intellectual Property Exposure: System prompts, custom function code, and workflow architecture of chatflows from other workspaces/organizations are exposed.
  • Credential Reference Leakage: The textToSpeech and speechToText fields include credential IDs, which can be abused via the TTS generate endpoint.
  • Amplified by Default: Most chatflows are created without an API key assigned (API keys are opt-in), so the majority of chatflows in a multi-workspace deployment are affected.

Recommended Fix

Add workspace scoping to the getChatflowByApiKey query by passing the API key workspace ID and filtering the OR clause:

// packages/server/src/services/chatflows/index.ts
const getChatflowByApiKey = async (apiKeyId: string, keyonly?: unknown, workspaceId?: string): Promise<any> => {
    const appServer = getRunningExpressApp()
    let query = appServer.AppDataSource.getRepository(ChatFlow)
        .createQueryBuilder("cf")
        .where("cf.apikeyid = :apikeyid", { apikeyid: apiKeyId })
    if (keyonly === undefined && workspaceId) {
        // Only include unprotected chatflows from the SAME workspace
        query = query.orWhere(
            "(cf.apikeyid IS NULL OR cf.apikeyid = :empty) AND cf.workspaceId = :workspaceId",
            { empty: "", workspaceId }
        )
    }
    const dbResponse = await query.orderBy("cf.name", "ASC").getMany()
    return dbResponse
}

Credited to offset.

Questions

Does the attacker need authentication?

Yes, a valid API key. It can belong to any workspace, and it gives access to unprotected chatflows in all of them.

What does keyonly=true do?

It limits the result to chatflows bound to the supplied API key. Without it, the query also returns all chatflows with an empty API key from every workspace.

Which version fixes CVE-2026-56268?

flowise 3.1.2. Versions up to and including 3.1.1 are affected.

Is data modified?

No. The advisory describes read-only disclosure of chatflow configuration.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries