CVE-2026-42867: Langflow: path traversal enables arbitrary file write

GHSA-79ph-745m-6wxq MEDIUM PoC AVAILABLE CISA: TRACK*
Published June 16, 2026
CISO Take

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.

Sources: NVD EPSS GitHub Advisory ATLAS

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?

Initial Access
Attacker authenticates to a Langflow instance using valid credentials obtained via phishing, credential stuffing, or as a legitimate user in a multi-tenant deployment.
AML.T0012
API Exploitation
Attacker sends POST /api/v1/knowledge_bases with a traversal payload (e.g., '../tenant-b/target_kb') in the name field, exploiting unsanitized path construction in create_knowledge_base().
AML.T0049
Arbitrary File Write
Langflow calls kb_path.mkdir() at the attacker-controlled traversal destination, then writes embedding_metadata.json and schema.json with attacker-specified content to that path.
AML.T0037
RAG Poisoning
Victim's knowledge base metadata is overwritten, corrupting document retrieval indexes and causing downstream RAG-grounded LLM responses to silently reflect adversary-influenced data.
AML.T0070

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Langflow pip <= 1.8.4 1.9.0
152.7K Pushed 6d ago 26% patched ~70d to patch Full package profile →

Do you use Langflow? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 27% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I Low
A Low

What should I do?

4 steps
  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 does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.3 - AI system security — Input validation and sanitization
NIST AI RMF
MEASURE 2.5 - AI system data privacy and integrity risks
OWASP LLM Top 10
LLM05 - Supply Chain Vulnerabilities

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

RAG pipelinesagent frameworksknowledge base systemsmulti-tenant AI platformsLLM orchestration pipelines

MITRE ATLAS Techniques

AML.T0037 Data from Local System
AML.T0049 Exploit Public-Facing Application
AML.T0070 RAG Poisoning

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.3
NIST AI RMF: MEASURE 2.5
OWASP LLM Top 10: LLM05

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'): 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

Timeline

Published
June 16, 2026
Last Modified
June 23, 2026
First Seen
June 16, 2026

Related Vulnerabilities