Summary
Flowise exposes an unauthenticated API endpoint that allows remote attackers to retrieve an organization's full SSO configuration, including OAuth client secrets in cleartext.
When the /api/v1/loginmethod endpoint is reachable and lacks access control, anyone who knows or can guess an organizationId can harvest sensitive credentials for Google, Microsoft/Azure, GitHub, and Auth0 integrations.
Affected context
This vulnerability appears in Flowise deployments where the /api/v1/loginmethod endpoint is exposed to untrusted networks (such as the public internet) and is not protected by authentication or authorization checks.
It is relevant to both FlowiseAI Cloud tenants and self-hosted instances that use SSO integrations (Google, Microsoft/Azure, GitHub, Auth0) with organization-specific configurations.
The issue manifests when the backend trusts an organizationId parameter without verifying the caller's identity or permissions before returning sensitive configuration details.
Exploit preconditions
- Attack surface: HTTP(S) API endpoint
/api/v1/loginmethod - Required access: Network ability to send requests to the Flowise instance; no prior authentication needed if the endpoint is publicly reachable
- Trigger point: Issuing a GET request with a valid or guessable
organizationIdparameter - Why exploitation is possible: The endpoint returns full SSO configuration, including OAuth client secrets, without enforcing authentication or access control tied to the organization or user context
Why this happens
The underlying issue is a missing authentication and authorization check on a sensitive configuration-disclosure endpoint.
Instead of treating the SSO configuration and OAuth client secrets as confidential data that must be protected behind authenticated and permission-aware access, the API trusts a caller-provided organizationId and returns the associated configuration without validating the caller's identity.
This maps to CWE-306: Missing Authentication for Critical Function, where a critical operation or data retrieval function fails to enforce proper authentication, leading to unintended exposure of sensitive information.
Potential impact
- Attackers may obtain OAuth client IDs and client secrets for Google, Microsoft/Azure, GitHub, and Auth0 SSO integrations.
- Attackers could misuse stolen OAuth credentials to impersonate the application, initiate rogue OAuth flows, or integrate with third-party APIs as the victim organization.
- Compromised OAuth clients can enable account takeover scenarios in downstream services that trust the Flowise application identity.
- Exposed secrets may facilitate broader supply-chain attacks by abusing trusted OAuth applications in other environments.
- Long-lived or unrotated credentials can be harvested and abused well after initial discovery if not promptly revoked.
General mitigation guidance
Effective mitigation centers on enforcing strict authentication and authorization for all endpoints that handle or return sensitive configuration data.
Common patterns include:
- Applying default access control to all configuration and administrative APIs, requiring authenticated sessions and role-based permissions.
- Treating OAuth client secrets and SSO metadata as secrets, ensuring they are never returned in cleartext to clients except in tightly controlled administrative contexts.
- Minimizing secret exposure by using write-only or masked views in administrative UIs and APIs and separating secret storage from operational metadata.
- Implementing server-side checks that bind organization-specific operations to the authenticated user's organization and permissions, rather than trusting client-supplied identifiers.
- Reducing the blast radius of compromise by rotating OAuth client secrets regularly and using least-privilege scopes on third-party integrations.
How teams detect issues like this
Detection efforts can focus on both code-level and operational signals:
- Static analysis and code review: Flag endpoints that return configuration or secret-like values and verify that they are wrapped in authentication/authorization middleware. Look for direct use of organization identifiers from request parameters without permission checks.
- API security policies: Enforce rules that prevent unauthenticated access to configuration, admin, or secret-handling paths, and regularly audit open endpoints against a documented inventory of sensitive APIs.
- Logging and monitoring: Track access to endpoints like
/api/v1/loginmethodand alert on unusual patterns, such as enumeration-like access of many organizationIds or high-volume unauthenticated requests. - Continuous security testing: Use API-focused security scanning and penetration testing to probe for missing authentication and over-disclosure of configuration across the service.

