CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

CVE-2026-42867

mediumCVSS 6.5covered by 1 sourcefirst seen 2026-06-16
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 f

⚡ Watch CVE-2026-42867

Get an email if CVE-2026-42867 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.

Exploitation outlook

Advisory coverage (1)

External references

NVD record for CVE-2026-42867

CVE.org record

Embed the live status

CVE-2026-42867 live status badge — this badge updates automatically when the KEV or exploit status changes. How to embed it →

[![CVE-2026-42867 status](https://www.csirts.com/badge/CVE-2026-42867)](https://www.csirts.com/cve/CVE-2026-42867)