CVE-2026-42867: Langflow: path traversal enables arbitrary file write
GHSA-79ph-745m-6wxq MEDIUM PoC AVAILABLE CISA: TRACK*Langflow's Knowledge Bases API (POST /api/v1/knowledge_bases) allows authenticated users to inject path traversal sequences such as ../victim_user/evil_kb or /tmp/pwned directly into the knowledge base name field, enabling directory creation and controlled file writes anywhere the application process has filesystem permissions. While authentication is required, this represents a serious cross-tenant integrity risk in any shared Langflow deployment, and the EPSS score places this vulnerability in the top 82nd percentile for exploitation likelihood — an unusually high signal for a medium-severity finding with no public exploit yet available. Langflow's track record of 48 CVEs in the same package underscores a pattern of systemic security debt that security teams should factor into their AI supply chain risk posture. Upgrade to Langflow 1.9.0 immediately; until patched, restrict access to the Knowledge Bases endpoint via WAF rules blocking path traversal patterns and ensure the application process runs with least-privilege filesystem permissions.
What is the risk?
Effective risk is elevated above the CVSS 6.5 baseline due to top-82nd-percentile EPSS and the specific threat to multi-tenant AI deployments. Authentication requirement reduces the attacker pool, but compromised credentials or insider threats are realistic given Langflow's broad deployment in enterprise AI workflows. The vulnerability is trivially exploitable once authenticated — no AI-specific expertise required — and can silently corrupt knowledge base metadata critical to RAG pipeline integrity. Langflow's history of 48 CVEs signals ongoing security debt, suggesting organizational risk exposure beyond this single finding.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Langflow | pip | <= 1.8.4 | 1.9.0 |
Do you use Langflow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
4 steps-
PATCH
Upgrade to Langflow 1.9.0, which introduces _validate_kb_path_containment() using Path.is_relative_to() to enforce strict path boundaries before any filesystem operations (PR #12337).
-
WORKAROUND
Block POST requests to /api/v1/knowledge_bases containing path traversal patterns (../, absolute paths starting with /) at the WAF or API gateway layer.
-
DETECT
Audit the filesystem for embedding_metadata.json or schema.json files appearing outside expected knowledge base directories; review API access logs for knowledge base names containing traversal sequences or absolute paths.
-
HARDEN
Run the Langflow process under a dedicated low-privilege service account with write permissions scoped strictly to the application's data directory; implement filesystem monitoring (inotify/auditd) on sensitive paths outside that boundary.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-42867?
Langflow's Knowledge Bases API (POST /api/v1/knowledge_bases) allows authenticated users to inject path traversal sequences such as ../victim_user/evil_kb or /tmp/pwned directly into the knowledge base name field, enabling directory creation and controlled file writes anywhere the application process has filesystem permissions. While authentication is required, this represents a serious cross-tenant integrity risk in any shared Langflow deployment, and the EPSS score places this vulnerability in the top 82nd percentile for exploitation likelihood — an unusually high signal for a medium-severity finding with no public exploit yet available. Langflow's track record of 48 CVEs in the same package underscores a pattern of systemic security debt that security teams should factor into their AI supply chain risk posture. Upgrade to Langflow 1.9.0 immediately; until patched, restrict access to the Knowledge Bases endpoint via WAF rules blocking path traversal patterns and ensure the application process runs with least-privilege filesystem permissions.
Is CVE-2026-42867 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-42867, increasing the risk of exploitation.
How to fix CVE-2026-42867?
1. PATCH: Upgrade to Langflow 1.9.0, which introduces _validate_kb_path_containment() using Path.is_relative_to() to enforce strict path boundaries before any filesystem operations (PR #12337). 2. WORKAROUND: Block POST requests to /api/v1/knowledge_bases containing path traversal patterns (../, absolute paths starting with /) at the WAF or API gateway layer. 3. DETECT: Audit the filesystem for embedding_metadata.json or schema.json files appearing outside expected knowledge base directories; review API access logs for knowledge base names containing traversal sequences or absolute paths. 4. HARDEN: Run the Langflow process under a dedicated low-privilege service account with write permissions scoped strictly to the application's data directory; implement filesystem monitoring (inotify/auditd) on sensitive paths outside that boundary.
What systems are affected by CVE-2026-42867?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, agent frameworks, knowledge base systems, multi-tenant AI platforms, LLM orchestration pipelines.
What is the CVSS score for CVE-2026-42867?
CVE-2026-42867 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.35%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0037 Data from Local System AML.T0049 Exploit Public-Facing Application AML.T0070 RAG Poisoning Compliance Controls Affected
What are the technical details?
Original Advisory
Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to 1.9.0, 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. This vulnerability is fixed in 1.9.0.
Exploitation Scenario
A threat actor with valid credentials to a multi-tenant Langflow deployment (obtained via phishing, credential stuffing, or as a legitimate user) sends POST /api/v1/knowledge_bases with body {"name": "../tenant-b/critical_kb"}. Langflow constructs the path without validation, calls mkdir() at the traversal destination, then writes embedding_metadata.json and schema.json with attacker-controlled content into Tenant B's knowledge base directory. Tenant B's RAG pipeline now retrieves documents guided by corrupted metadata, causing their LLM to produce hallucinated or adversary-influenced responses grounded in poisoned retrieval context. The attack produces no crash or obvious error — it may go undetected until anomalous AI output quality triggers investigation.
Weaknesses (CWE)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Primary
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Primary
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L References
Timeline
Related Vulnerabilities
CVE-2026-10561 10.0 Langflow: auth bypass + unauthenticated RCE (CVSS 10)
Same package: langflow CVE-2026-10134 10.0 Langflow: unauthenticated RCE via tool_code injection
Same package: langflow CVE-2026-33309 9.9 langflow: Path Traversal enables file access
Same package: langflow CVE-2026-55255 9.9 Langflow: IDOR allows cross-user flow execution
Same package: langflow CVE-2026-7873 9.9 Langflow: authenticated RCE enables credential theft
Same package: langflow