Media

Langflow: Path Traversal in Knowledge Bases API via Creation Endpoint

  • Publicada: 16.06.2026
  • Actualizado: 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

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) langflow < 1.9.0 1.9.0

Referencias

Puntuación CVSS 6.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Debilidad (CWE)
CWE-22
Plataforma
Python (PyPI)
Paquete
langflow
Publicada
16.06.2026
Actualizado
11.10.2026 14:18

Fuentes y licencias

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

Historial de vulnerabilidades: langflow

Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (42) en el archivo
Entradas en total
42
Primera → última
06.2024 10.2026
Sin corrección
7
Explotada en ataques
5

Distribución por gravedad

  • Crítica 15
  • Alta 17
  • Media 7
  • Baja 3

Divulgaciones por año

  1. 2024: 4
  2. 2025: 5
  3. 2026: 33
Gravedad:
  1. Crítica · 9.1 CVE-2026-9205 < 1.10.1 1.10.1
  2. Crítica · 9.8 CVE-2026-8505 >= 1.7.0, < 1.9.1 1.9.1
  3. Alta · 8.8 CVE-2026-7700 >= 1.3.0, < 1.10.3 1.10.3
  4. Crítica · 9.6 CVE-2026-48519 < 1.9.2 1.9.2
  5. Langflow: Path Traversal in Knowledge Bases API via Creation Endpoint esta entrada
    Media · 6.5 CVE-2026-42867 < 1.9.0 1.9.0
  6. Crítica · 9.6 CVE-2026-42048 < 1.9.0 1.9.0
  7. Alta · 7.5 CVE-2026-33484 >= 1.0.0, < 1.9.0 1.9.0
Mostrar más (13) Mostrando 20 de 33

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.