CVE-2026-42867: Langflow Path Traversal in Knowledge Bases API
Langflow, a platform for building AI-powered agents and workflows, contains a path traversal vulnerability in its Knowledge Bases API that allows authenticated users to write files anywhere on the server. The flaw exists because user-provided knowledge base names are not properly validated before being used to construct file paths. An attacker with valid credentials can exploit this to create arbitrary directories and files, potentially compromising server integrity. The issue is resolved in version 1.9.0.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- Weaknesses (CWE)
- CWE-22
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-26
NVD description (verbatim)
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.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-42867 is a path traversal vulnerability (CWE-22) affecting Langflow versions prior to 1.9.0. The vulnerable endpoint is POST /api/v1/knowledge_bases, which accepts a knowledge base name parameter without sufficient sanitization. The application directly incorporates this user-supplied input into file system paths without canonicalization or containment checks. An authenticated attacker can bypass directory restrictions using path traversal sequences (e.g., '../') to write files outside the intended knowledge base directory tree, achieving arbitrary file write capabilities on the host system.
Business impact
While exploitation requires valid authentication credentials, the ability to write arbitrary files on a Langflow server poses significant operational risk. An attacker could inject malicious files into application directories, modify configuration files, corrupt data stores, or stage further compromise. For organizations deploying Langflow in production environments with AI agent automation, unauthorized file writes could disrupt service availability, compromise the integrity of AI workflows, or enable lateral movement within the infrastructure.
Affected systems
Langflow versions prior to 1.9.0 are affected. The vulnerability resides in the Knowledge Bases API endpoint. Any deployment running an unpatched version with network exposure to the /api/v1/knowledge_bases endpoint is at risk if authenticated users can be compromised or if internal users have malicious intent.
Exploitability
Exploitation requires valid authentication to access the API endpoint. The attack complexity is low, and no user interaction is required. While the barrier to entry (authentication) is present, once an attacker has credentials—through credential compromise, insider threat, or weak credential hygiene—the vulnerability is trivial to exploit via direct API requests. The likelihood of authenticated user compromise in many environments makes this practically exploitable despite the authentication requirement.
Remediation
Upgrade Langflow to version 1.9.0 or later, which includes proper input sanitization and path containment mechanisms. Before upgrading, restrict network access to the Langflow API to trusted internal networks and implement strict authentication controls. Review knowledge base management logs to identify any suspicious activity or unexpected file creation in recent deployments.
Patch guidance
Deploy Langflow 1.9.0 or newer. Verify the patch by checking the application version in the Langflow dashboard or via version endpoints. Test the upgrade in a staging environment to ensure compatibility with custom workflows and knowledge bases. If immediate patching is not possible, disable or restrict access to the Knowledge Bases API at the network or API gateway level.
Detection guidance
Monitor for POST requests to /api/v1/knowledge_bases with knowledge base names containing path traversal sequences ('../', '..\', encoded variants). Alert on file creation or modification in directories outside expected knowledge base storage paths. Review authentication logs for unusual API access patterns or credential usage. Examine file system logs for unexpected write operations correlating with API activity timestamps.
Why prioritize this
While rated MEDIUM severity (CVSS 6.5) due to the authentication requirement, this vulnerability should be prioritized for remediation because it enables direct server compromise through file write capabilities. Authentication is often a weaker barrier than assumed—credential leaks, insider threats, and API token exposure are common. The ease of exploitation once authenticated access is obtained warrants prompt patching.
Risk score, explained
CVSS 3.1 score of 6.5 reflects: network-accessible attack vector (AV:N), low attack complexity (AC:L), no privilege elevation needed (PR:N), no user interaction required (UI:N), and impacts to integrity and availability (I:L/A:L) without confidentiality impact. The score appropriately penalizes the requirement for authentication (PR:N scope) but does not fully capture organizational risk in environments with weak credential management, making contextualized assessment important.
Frequently asked questions
Can this vulnerability be exploited without authentication?
No. The vulnerable endpoint requires valid authentication credentials. However, this does not eliminate risk—compromised user accounts, API token leaks, or insider threats can provide the necessary access.
What versions of Langflow are vulnerable?
All versions prior to 1.9.0 are affected. Verify your deployment version in the Langflow UI or configuration files and upgrade immediately if you are running an earlier release.
What files or directories are at risk?
Any file or directory on the server's filesystem where the Langflow process has write permissions is at risk. An attacker could write to application directories, configuration paths, or data storage locations, potentially enabling code execution or data manipulation.
If we restrict API access at the network level, is this vulnerability mitigated?
Network restriction provides short-term defense, but it is not a substitute for patching. It reduces exposure but does not address the underlying flaw. Patching to 1.9.0 is the definitive remediation.
This analysis is provided for informational purposes to assist security professionals in vulnerability assessment and remediation planning. The vulnerability details, affected versions, and patch information are based on official vendor disclosures and CVE records current as of the publication date. Organizations should verify all patch versions, compatibility information, and deployment impacts through official Langflow security advisories and release notes before implementing any changes. Actual risk and exploitability may vary based on network architecture, access controls, authentication strength, and deployment configuration. No exploit code or weaponized proof-of-concept is provided in this analysis. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2018-25393MEDIUMNavigate CMS 2.8.5 Path Traversal Vulnerability (CVSS 6.5)
- CVE-2018-25421MEDIUMOpen STA Manager 2.3 Path Traversal File Download Vulnerability
- CVE-2019-25734MEDIUMContact Form by WD CSRF & Local File Inclusion Vulnerability
- CVE-2019-25740MEDIUMJoomla com_jsjobs Arbitrary File Deletion Vulnerability
- CVE-2022-50953MEDIUMWordPress admin-word-count-column Plugin Local File Read Vulnerability
- CVE-2024-47263MEDIUMSynology Hyper Backup Path Traversal – Admin Privilege Required
- CVE-2024-47273MEDIUMSynology Hyper Backup Path Traversal Vulnerability (4.3 MEDIUM)
- CVE-2025-24268MEDIUMmacOS Path Traversal Vulnerability – Patch Sequoia 15.4