Summary
Flowise's text-to-speech generation endpoint allowed unauthenticated callers to supply an arbitrary credentialId, which the server then used to decrypt and use stored provider credentials such as OpenAI or ElevenLabs API keys.
In deployments where the endpoint was exposed, an attacker could abuse this behavior to invoke speech generation backed by someone else's paid credentials, leading to unauthorized resource usage and potential financial impact.
Affected context
This vulnerability affects Flowise instances that:
- Expose the
/api/v1/text-to-speech/generateendpoint over a network interface, and - Have at least one stored text-to-speech or LLM-related credential (e.g., OpenAI, ElevenLabs) identified by a
credentialId.
The issue arises because the endpoint is whitelisted (no authentication required) and trusts the caller-supplied credentialId even when no chatflowId is provided, allowing the backend to decrypt and use credentials without verifying user ownership or permissions.
Exploit preconditions
- Attack surface: Network-accessible Flowise API at
POST /api/v1/text-to-speech/generate. - Required access: Ability to send HTTP requests to the Flowise server (no authentication needed if the endpoint is publicly reachable).
- Key input: A
credentialIdvalue in the request body; nochatflowIdis required for the vulnerable behavior. - Why exploitation is possible: The endpoint is whitelisted from auth checks and performs authorization purely based on a caller-controlled identifier. There is no verification that the requester is associated with the supplied
credentialId, enabling an Insecure Direct Object Reference (IDOR) pattern.
Why this happens
The core issue is improper authorization based on user-controllable identifiers, aligning with CWE-639: Authorization Bypass Through User-Controlled Key.
The text-to-speech endpoint:
- Is explicitly configured to bypass authentication/authorization.
- Accepts a raw
credentialIdfrom the client and passes it directly into backend logic. - Uses this identifier to locate and decrypt stored credentials without confirming that the client owns or is entitled to use those credentials.
This creates an insecure pattern where internal objects (credential records) are referenced directly by IDs that are neither scoped nor access-checked, allowing attackers to leverage the system as a proxy for third-party API usage.
Potential impact
- Unauthorized use of stored API credentials (e.g., OpenAI, ElevenLabs) to generate speech or perform billable operations.
- Increased costs or quota exhaustion for the credential owner due to abusive or automated requests.
- Indirect reputational damage if abused requests are attributable to the victim's API account.
- Potential enumeration of valid credential identifiers through trial and error, increasing the scope of abuse.
General mitigation guidance
Effective mitigation focuses on enforcing strong, context-aware access control around credential usage:
- Require authentication for all endpoints that can access or use stored credentials, including text-to-speech generation.
- Bind credentials to an owning principal (user, workspace, or project) and verify that the requester is authenticated as that principal before decrypting or using any credential.
- Avoid accepting raw credential identifiers directly from unauthenticated or untrusted clients; instead, derive the credential context from server-side state (e.g., from an authenticated session, chatflow configuration, or scoped resource).
- Apply least-privilege design so that application components can only access the specific credentials required for the current operation.
- Introduce server-side validation that rejects operations when critical identifiers (like
credentialId) are missing, inconsistent, or not associated with the current user's allowed scope.
How teams detect issues like this
Organizations can detect and monitor this class of issue using:
- Static analysis and code review:
- Flag whitelisted or unauthenticated routes that read identifiers such as
credentialId,apiKeyId, or similar sensitive keys. - Review controller methods where credentials are decrypted or loaded, ensuring there is a preceding authorization check tied to an authenticated principal.
- Look for patterns where client-supplied IDs are used as direct keys in credential or secret stores.
- Logging and monitoring:
- Log usage of sensitive credentials with associated requester context (IP, auth principal, endpoint).
- Alert on anomalous patterns, such as high-frequency calls to credential-backed endpoints from unauthenticated sources.
- Security policy enforcement:
- Enforce a policy that no endpoint interacting with decrypted secrets or credentials can be marked as "no auth".
- Integrate automated checks in CI/CD to detect new unauthenticated routes that access credential management or decryption utilities.

