Hoch

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

  • Veröffentlicht: 18.03.2026
  • Aktualisiert: 11.10.2026 12:19

Detection Method: Kolega.dev Deep Code Scan

Attribute Value
Location src/backend/base/langflow/api/v1/api_key.py:44-53
Practical Exploitability High
Developer Approver faizan@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.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) langflow < 1.9.0 1.9.0

Verweise

CVSS-Wert -
CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Schwäche (CWE)
CWE-639
Plattform
Python (PyPI)
Paket
langflow
Veröffentlicht
18.03.2026
Aktualisiert
11.10.2026 12:19

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-78 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-rf6x-r45m-xv3w - CC BY 4.0

Schwachstellenhistorie: langflow

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (42) im Archiv
Einträge insgesamt
42
Erste → letzte
06.2024 10.2026
Ohne Fix
7
In Angriffen ausgenutzt
5

Verteilung nach Schweregrad

  • Kritisch 15
  • Hoch 17
  • Mittel 7
  • Niedrig 3

Veröffentlichungen pro Jahr

  1. 2024: 4
  2. 2025: 5
  3. 2026: 33
Schweregrad:
  1. Kritisch · 9.1 CVE-2026-9205 < 1.10.1 1.10.1
  2. Kritisch · 9.8 CVE-2026-8505 >= 1.7.0, < 1.9.1 1.9.1
  3. Hoch · 8.8 CVE-2026-7700 >= 1.3.0, < 1.10.3 1.10.3
  4. Kritisch · 9.6 CVE-2026-48519 < 1.9.2 1.9.2
  5. Kritisch · 9.6 CVE-2026-42048 < 1.9.0 1.9.0
  6. Hoch · 7.5 CVE-2026-33484 >= 1.0.0, < 1.9.0 1.9.0
  7. Kritisch · 9.9 CVE-2026-33309 >= 1.2.0, < 1.9.0 1.9.0
  8. Langflow is Missing Ownership Verification in API Key Deletion (IDOR) dieser Eintrag
    Hoch CVE-2026-33053 < 1.9.0 1.9.0
  9. Kritisch · 9.8 In Angriffen ausgenutzt CVE-2026-33017 < 1.9.0 1.9.0
  10. Kritisch · 9.8 CVE-2026-27966 <= 1.8.0rc2 keine Korrektur
  11. Hoch In Angriffen ausgenutzt CVE-2026-0770 <= 1.7.3 keine Korrektur
  12. Hoch · 7.7 CVE-2025-68477 < 1.7.1 1.7.1
  13. Hoch · 7.1 CVE-2025-68478 < 1.7.1 1.7.1
  14. Kritisch In Angriffen ausgenutzt CVE-2025-3248 < 1.3.0 1.3.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.