Skip to main content

Langflow EUVDEUVD-2026-38518

| CVE-2026-42867 MEDIUM
Path Traversal (CWE-22)
2026-06-16 https://github.com/langflow-ai/langflow GHSA-79ph-745m-6wxq
6.5
CVSS 3.1 · Vendor: https://github.com/langflow-ai/langflow
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to Langflow instance
  2. Delivery
    Craft POST /api/v1/knowledge_bases with traversal name field
  3. Exploit
    Server concatenates unsanitized name to user KB path
  4. Execution
    Path resolves outside user boundary
  5. Persist
    mkdir() creates attacker-chosen directory
  6. Impact
    Write embedding_metadata.json and schema.json to victim path

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must hold a valid authenticated session on the Langflow instance - the POST /api/v1/knowledge_bases endpoint requires authentication, and the CVSS PR:N assignment in the provided vector conflicts with the advisory's explicit statement of 'authenticated attacker'; authentication is a firm prerequisite. The endpoint must be network-reachable; in deployments where the API is internal-only, external exploitation is not possible. The server process must have write permission to the target directory for the traversal to succeed at the filesystem level. No non-default application configuration is required: any Langflow instance running <= 1.8.4 with the Knowledge Bases API enabled is vulnerable as-shipped. Exploitation is limited to a write primitive only - reading arbitrary files is not achievable through this vulnerability. The impact is amplified in multi-tenant deployments where multiple users share a common KB root path.

Impact

The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L, score 6.5) contains a material discrepancy: PR:N implies unauthenticated exploitation, but the GHSA advisory explicitly requires a valid authenticated session. This mismatch appears to be an incorrect CVSS assignment and overstates the unauthenticated attack surface - real-world exploitation requires credentials. Additionally, I:L understates the integrity impact: the ability to write files at arbitrary server paths, including overwriting embedding_metadata.json and schema.json in other tenants' knowledge base directories, is more accurately characterized as I:H. A public PoC is included directly in the advisory, significantly lowering the technical bar. KEV status is not confirmed, and EPSS data was not provided, so exploitation probability cannot be quantified. In multi-tenant Langflow deployments the blast radius is elevated because a legitimate user of one tenant can corrupt another tenant's knowledge base metadata. Risk is bounded to paths where the server process has write permissions and does not expose a read primitive for arbitrary files.

Exploit ScenarioDerived

An authenticated Langflow user sends a POST request to /api/v1/knowledge_bases with {"name": "../victim_user/evil_kb", ...} in the JSON body. The unpatched server constructs a resolved path outside the attacker's user directory, calls Path.mkdir() to create the target directory, then writes embedding_metadata.json and schema.json into it - silently overwriting any existing metadata files in a co-located victim tenant's knowledge base. A public PoC demonstrating both the relative traversal variant and the absolute path variant (e.g., "name": "/tmp/pwned") is included in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Path traversal in Langflow's Knowledge Bases API (POST /api/v1/knowledge_bases) allows authenticated users to create directories and write controlled JSON files outside their designated storage boundary anywhere on the server filesystem. Versions up to and including langflow 1.8.4 (pip) are confirmed affected; the root cause is the unsanitized use of a user-supplied name field in path construction within create_knowledge_base. A public proof-of-concept is included in the GHSA advisory, lowering the exploitation bar considerably, though no CISA KEV listing confirms active widespread exploitation at time of analysis.

RemediationAI

Upgrade langflow to version 1.9.0 or later, which incorporates the fix from PR #12337 (https://github.com/langflow-ai/langflow/pull/12337). The patch introduces _validate_kb_path_containment(), which calls .resolve() on both the user base path and the attacker-supplied KB path before enforcing containment with Path.is_relative_to(), blocking relative traversal sequences, absolute path injection, and prefix-ambiguity bypasses. Regression tests covering all three payload classes were added and verify a 403 Forbidden response. If immediate upgrade is not feasible, operators should restrict access to POST /api/v1/knowledge_bases at the network or API gateway layer to the minimum required set of authenticated users, and consider deploying a WAF rule that rejects name field values containing .. sequences or beginning with /. Note that WAF-based input filtering is a compensating control only - it may be bypassed via URL encoding, Unicode normalization, or other obfuscation techniques - and does not substitute for patching. Consult the advisory at https://github.com/langflow-ai/langflow/security/advisories/GHSA-79ph-745m-6wxq for authoritative guidance.

Affected VersionsENISA

langflow < 1.9.0

Affected Packages

pypi langflow fix: 1.9.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is classified as CWE-22 (Path Traversal) and resides in src/backend/base/langflow/api/v1/knowledge_bases.py in the create_knowledge_base function. The function builds a filesystem path by concatenating the server's KB root, the authenticated user's identifier, and the attacker-controlled name field, then passes the result directly to Python's Path.mkdir() with no prior call to .resolve() or containment validation. Python's pathlib semantics allow two distinct bypass primitives: supplying a relative traversal sequence (e.g., ../victim_user/evil_kb) exits the intended directory, while supplying an absolute path (e.g., /tmp/pwned) causes pathlib to silently drop all preceding path components. A subtler third variant exploits a prefix-ambiguity bug present when startswith() is used for containment - a username of alice would incorrectly permit writes to alice_evil/ because the string prefix matches. The fix in PR #12337 resolves all three variants by calling .resolve() on both the user base path and the constructed KB path before applying Path.is_relative_to(), which performs a proper hierarchical containment check rather than a string prefix comparison. Affected package is pkg:pip/langflow <= 1.8.4.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/langflow-ai/langflow) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 7.1 HIGH

Requires authenticated session (PR:L); arbitrary server-path file write warrants I:H; no read primitive means C:N.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/langflow-ai/langflow).

CVSS VectorVendor: https://github.com/langflow-ai/langflow

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy