/

CVE-2026-33053

Severity:

HIGH RISK

(8.8)

Insecure Direct Object Reference in Langflow API Key

CVE-2026-33053

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference

CWE:

CWE-639

Impact:

Unauthorized Resource Manipulation (Cross-User API Key Deletion)

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Langflow's API key deletion endpoint deletes API keys based solely on an identifier in the path, without verifying that the key belongs to the currently authenticated user.

Under shared or multi-tenant deployments, an authenticated user who can guess or enumerate API key identifiers may be able to delete other users' API keys, disrupting their workflows and access.

Affected context

This vulnerability appears in Langflow instances that:

  • Expose the delete_api_key_route() endpoint to authenticated users
  • Identify API keys by a path parameter such as api_key_id
  • Operate in a multi-user or multi-tenant environment where users own distinct API keys

The risk is most pronounced where API key identifiers are predictable, discoverable, or can be inferred through UI, logs, or indirect enumeration.

Exploit preconditions

  • Attack surface: HTTP API endpoint for API key management (e.g., /api/keys/{api_key_id} style routes).
  • Required access: Valid authenticated user session that passes the generic get_current_active_user check.
  • Trigger point: Sending a DELETE request with an api_key_id that refers to an API key owned by another user.
  • Why exploitation is possible: The delete_api_key() CRUD function is called without confirming ownership, so any authenticated user can request deletion of any key referenced by ID, provided they can supply a valid identifier.

Why this happens

The core issue is an authorization flaw where access control is enforced only at the level of "is this user authenticated?" and not "is this user authorized to manipulate this specific resource?".

The route handler accepts an api_key_id and calls delete_api_key() without validating that the corresponding API key belongs to the current user.

This pattern maps to CWE-639: Insecure Direct Object Reference, in which user-controlled identifiers directly reference internal objects without a resource-level ownership or permission check.

Potential impact

  • Disruption of other users' workflows by deleting their API keys.
  • Forced downtime for agents and integrations that depend on deleted keys.
  • Indirect denial of service against specific users or teams by repeatedly removing their credentials.
  • Potential loss of auditability and confusion in incident response due to unexpected key deletions.

General mitigation guidance

Effective mitigation centers on enforcing resource-level authorization for all operations that act on user-owned objects:

  • Ensure that all CRUD operations for API keys verify ownership by combining the current user's identity with the resource identifier (e.g., look up keys by (user_id, api_key_id)).
  • Apply "scoped queries" so database lookups automatically constrain resources to the authenticated user's context.
  • Treat any operation on user-specific resources (create, read, update, delete) as needing explicit checks for tenancy and ownership, not just generic authentication.
  • Where possible, design API endpoints so that identifiers are not globally meaningful but already scoped to the current user or tenant.
  • Adopt a principle of least privilege, allowing users to affect only objects that are explicitly associated with their account or role.

How teams detect issues like this

Detection typically involves both code-level analysis and runtime monitoring:

  • Static analysis / code review:
  • Flag handlers that take IDs in path or query parameters and directly call data layer methods without passing or checking the current user context.
  • Look for CRUD functions that accept only a resource ID (e.g., delete_api_key(id)) instead of (user_id, id) or similar scoped parameters.
  • Review multi-tenant resource access patterns for missing ownership or tenant checks.
  • Policy enforcement:
  • Establish coding standards that require authorization checks for all operations on user-owned resources.
  • Use automated review tools or linters to identify endpoints that lack explicit access control annotations or ownership checks.
  • Runtime signals:
  • Monitor logs for repeated deletion attempts across multiple user IDs or key IDs originating from a single account.
  • Add structured logging that records the requester identity, the target resource owner, and the outcome of authorization decisions.

Sources

SourceLink
github.comgithub.com/langflow-ai/langflow/security/advisories/GHSA-rf6x-r45m-xv3w

Frequently asked

questions

Yes. Any remote client that can authenticate to the Langflow instance and reach the API key deletion endpoint could attempt to delete other users' keys by supplying their identifiers.

No. The vulnerability exists precisely because only a generic "active user" check is applied. A regular authenticated user is sufficient, as long as they can provide another user's API key identifier.

The robust fix is to enforce resource ownership at the data access layer and the route level: ensure that API key lookups and deletions are always scoped by the current user or tenant, and that operations fail if a key is not owned by the requester.

Adopt a consistent access control model where every endpoint that accepts a resource identifier also validates ownership or permissions, favor patterns like "query by user + id" instead of "query by id", and use automated tests and code review checklists to verify authorization logic for all user-facing endpoints.

Find out what's already
exploitable in your codebase.