Mittel

Langflow: Path Traversal in Knowledge Bases API via Creation Endpoint

  • Veröffentlicht: 16.06.2026
  • Aktualisiert: 11.10.2026 14:18

Summary

Langflow is vulnerable to Path Traversal in the Knowledge Bases API (POST /api/v1/knowledge_bases). This occurs because user-supplied knowledge base names are used directly to create file paths without proper sanitization or containment checks. An authenticated attacker can exploit this flaw to create directories and write files anywhere on the server's filesystem.

Details

The vulnerability exists in the create_knowledge_base function within src/backend/base/langflow/api/v1/knowledge_bases.py.

This function constructs file paths directly from the user-supplied name field without sanitization. The value is concatenated with the user's base directory and passed directly to kb_path.mkdir(). Immediately following the directory creation, the application writes embedding_metadata.json and schema.json into this attacker-controlled path.

PoC (Proof of Concept)

For the Create endpoint, an attacker can supply traversal sequences or absolute paths in the name field:

../victim_user/evil_kb or /tmp/pwned

This forces kb_path.mkdir() to create directories and write specific application files (embedding_metadata.json and schema.json) at any reachable path on the server.

Impact

Any Langflow instance exposing this endpoint to authenticated users is vulnerable. This exposes the server to:

  • Cross-user data compromise: Creation of directories and files within another tenant's knowledge base space.
  • Arbitrary filesystem manipulation: Directory creation at any path on the server where the application has write permissions (e.g., /app/data).
  • Data overwrite: Overwriting existing embedding_metadata.json and schema.json files in attacker-targeted paths, potentially corrupting existing knowledge bases.

Fixes

The issue was addressed in PR #12337. The fix introduces the _validate_kb_path_containment() helper function, which uses Path.is_relative_to() instead of startswith() to enforce strict path boundaries and prevent prefix-ambiguity bugs. This helper is applied before any filesystem operations. Regression tests were added to verify that traversal payloads return a 403 Forbidden.

Acknowledgements

Thanks to the security researchers who responsibly disclosed this vulnerability:

  • @ddlxstudio
  • @nekros1xx

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 6.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Schwäche (CWE)
CWE-22
Plattform
Python (PyPI)
Paket
langflow
Veröffentlicht
16.06.2026
Aktualisiert
11.10.2026 14:18

Quellen und Lizenzen

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

OSV / GitHub Advisory Database - GHSA-79ph-745m-6wxq - 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. Langflow: Path Traversal in Knowledge Bases API via Creation Endpoint dieser Eintrag
    Mittel · 6.5 CVE-2026-42867 < 1.9.0 1.9.0
  6. Kritisch · 9.6 CVE-2026-42048 < 1.9.0 1.9.0
  7. Hoch · 7.5 CVE-2026-33484 >= 1.0.0, < 1.9.0 1.9.0
  8. Kritisch · 9.9 CVE-2026-33309 >= 1.2.0, < 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.