CVE-2026-33053
JSON

6.1medium

Langflow has Missing Ownership Verification in API Key Deletion (IDOR)

Severity
6.1medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.61% (higher than 43% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rf6x-r45m-xv3wPYSEC-2026-78

Description

Langflow is a tool for building and deploying AI-powered agents and workflows. In versions prior to 1.9.0, the delete_api_key_route() endpoint accepts an api_key_id path parameter and deletes it with only a generic authentication check (get_current_active_user dependency). However, the delete_api_key() CRUD function does NOT verify that the API key belongs to the current user before deletion.

Affected

Product or packageVersionsReported by
langflow-ai langflow< 1.9.0CVE List
langflow (PyPI)before 1.9.0GitHub Advisory Database, PyPA Advisory Database
langflow langflowbefore 1.9.0NVD

All scores

GitHub_M6.1medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:L
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-639

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Langflow is a tool for building and deploying AI-powered agents and workflows. In versions prior to 1.9.0, the delete_api_key_route() endpoint accepts an api_key_id path parameter and deletes it with only a generic authentication check (get_current_active_user dependency). However, the delete_api_key() CRUD function does NOT verify that the API key belongs to the current user before deletion.

GitHub Advisory Database

Detection Method: Kolega.dev Deep Code Scan

AttributeValue
Locationsrc/backend/base/langflow/api/v1/api_key.py:44-53
Practical ExploitabilityHigh
Developer Approverfaizan@kolega.ai
Description

The delete_api_key_route() endpoint accepts an api_key_id path parameter and deletes it with only a generic authentication check (get_current_active_user dependency). However, the delete_api_key() CRUD function does NOT verify that the API key belongs to the current user before deletion.

Affected Code
@router.delete("/{api_key_id}", dependencies=[Depends(auth_utils.get_current_active_user)])
async def delete_api_key_route(
    api_key_id: UUID,
    db: DbSession,
):
    try:
        await delete_api_key(db, api_key_id)
    except Exception as e:
        raise HTTPException(status_code=400, detail=str(e)) from e
    return {"detail": "API Key deleted"}
Evidence

In crud.py lines 44-49, delete_api_key() retrieves the API key by ID and deletes it without checking if the key belongs to the authenticated user. The endpoint also doesn't pass the current_user to the delete function for verification.

Impact

An authenticated attacker can enumerate and delete API keys belonging to other users by guessing or discovering their API key IDs. This allows account takeover, denial of service, and disruption of other users' integrations.

Recommendation

Modify the delete_api_key endpoint and function: (1) Pass current_user to the delete function; (2) In delete_api_key(), verify api_key.user_id == current_user.id before deletion; (3) Raise a 403 Forbidden error if the user doesn't own the key. Example: if api_key.user_id != user_id: raise HTTPException(status_code=403, detail='Unauthorized')

Notes

Confirmed IDOR vulnerability. The delete_api_key_route endpoint at line 44-53 accepts an api_key_id and calls delete_api_key(db, api_key_id) without passing the current_user. The CRUD function delete_api_key() at crud.py:44-49 retrieves the API key by ID and deletes it without verifying ownership (api_key.user_id == current_user.id). Compare this to the GET endpoint at lines 17-28 which correctly filters by user_id, and the POST endpoint at lines 31-41 which correctly associates the key with user_id. An authenticated attacker can delete any user's API keys by guessing/enumerating UUIDs. Fix: Pass current_user to delete_api_key and verify api_key.user_id == current_user.id before deletion, returning 403 if unauthorized.

Developer Review Notes

Does not accept current_user as a parameter. Allowing deletion of any user's API keys even without permissions.

NVD (es)

Langflow es una herramienta para construir y desplegar agentes y flujos de trabajo impulsados por IA. En versiones anteriores a la 1.9.0, el endpoint delete_api_key_route() acepta un parámetro de ruta api_key_id y lo elimina con solo una verificación de autenticación genérica (dependencia get_current_active_user). Sin embargo, la función CRUD delete_api_key() NO verifica que la clave API pertenezca al usuario actual antes de la eliminación.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-33053 changed 2026-03-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-rf6x-r45m-xv3w changed 2026-06-06CC-BY-4.0
NVDCVE-2026-33053 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-78 changed 2026-05-20CC-BY-4.0