CVE-2026-42048: Langflow: path traversal allows arbitrary directory deletion
GHSA-9whx-c884-c68q CRITICAL CISA: TRACK*Langflow's bulk knowledge base delete endpoint (DELETE /api/v1/knowledge_bases) allows any authenticated user to delete arbitrary directories on the server filesystem by supplying path traversal sequences in the kb_names parameter — the handler bypasses the framework's own path sanitization and calls shutil.rmtree() directly on attacker-controlled input. With a CVSS of 9.6 and Scope:Changed, this is a cross-tenant weapon: a low-privilege user in a multi-tenant deployment can wipe another tenant's knowledge bases or destroy critical application directories, making data loss potentially unrecoverable if backups share the same filesystem. Exploitation requires nothing beyond a valid account and a single crafted API call — no AI expertise, no special tooling. No public exploit or KEV entry exists yet, but the triviality of the payload (../victim_user/kb_name) means time-to-exploitation is minimal once the advisory circulates. Upgrade to Langflow 1.9.0 immediately; if patching is blocked, restrict the DELETE /api/v1/knowledge_bases endpoint at the WAF or API gateway and audit Langflow process user filesystem permissions.
What is the risk?
Risk is critical. CVSS 9.6 with Network/Low/Low/None/Changed/None/High/High reflects the real threat: no specialized skill, remote network access, minimal privileges, and cross-boundary impact. The 'authenticated' requirement offers weak protection in SaaS or shared deployments where attacker-controlled accounts are trivially obtained. The package carries 30 CVEs — a signal of systemic security debt. The absence of EPSS data and KEV listing is offset by the absolute simplicity of the exploit mechanics. Multi-tenant Langflow deployments and any instance where the process user has broad filesystem write permissions face the highest exposure.
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?
6 steps-
Patch immediately: upgrade to Langflow 1.9.0 (fix in PR #12243, hardened in PR #12337 with Path.is_relative_to() containment checks).
-
If patching is blocked: block DELETE /api/v1/knowledge_bases at WAF/API gateway or reverse proxy with a deny rule — this endpoint is not needed for read-only consumers.
-
Run the Langflow process under a dedicated OS user with write permissions scoped only to the intended knowledge base root directory (principle of least privilege).
-
Audit current filesystem permissions on the Langflow host to confirm blast radius.
-
Detection: monitor web/app logs for DELETE requests to /api/v1/knowledge_bases containing '../' patterns in request bodies; alert on shutil.rmtree() calls outside expected paths if process-level auditing (auditd/eBPF) is in place.
-
Verify backups are stored on a separate filesystem or remote location not writable by the Langflow process user.
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-42048?
Langflow's bulk knowledge base delete endpoint (DELETE /api/v1/knowledge_bases) allows any authenticated user to delete arbitrary directories on the server filesystem by supplying path traversal sequences in the kb_names parameter — the handler bypasses the framework's own path sanitization and calls shutil.rmtree() directly on attacker-controlled input. With a CVSS of 9.6 and Scope:Changed, this is a cross-tenant weapon: a low-privilege user in a multi-tenant deployment can wipe another tenant's knowledge bases or destroy critical application directories, making data loss potentially unrecoverable if backups share the same filesystem. Exploitation requires nothing beyond a valid account and a single crafted API call — no AI expertise, no special tooling. No public exploit or KEV entry exists yet, but the triviality of the payload (../victim_user/kb_name) means time-to-exploitation is minimal once the advisory circulates. Upgrade to Langflow 1.9.0 immediately; if patching is blocked, restrict the DELETE /api/v1/knowledge_bases endpoint at the WAF or API gateway and audit Langflow process user filesystem permissions.
Is CVE-2026-42048 actively exploited?
No confirmed active exploitation of CVE-2026-42048 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-42048?
1. Patch immediately: upgrade to Langflow 1.9.0 (fix in PR #12243, hardened in PR #12337 with Path.is_relative_to() containment checks). 2. If patching is blocked: block DELETE /api/v1/knowledge_bases at WAF/API gateway or reverse proxy with a deny rule — this endpoint is not needed for read-only consumers. 3. Run the Langflow process under a dedicated OS user with write permissions scoped only to the intended knowledge base root directory (principle of least privilege). 4. Audit current filesystem permissions on the Langflow host to confirm blast radius. 5. Detection: monitor web/app logs for DELETE requests to /api/v1/knowledge_bases containing '../' patterns in request bodies; alert on shutil.rmtree() calls outside expected paths if process-level auditing (auditd/eBPF) is in place. 6. Verify backups are stored on a separate filesystem or remote location not writable by the Langflow process user.
What systems are affected by CVE-2026-42048?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, LLM orchestration platforms, Multi-tenant AI application deployments, Agent frameworks using knowledge base tools.
What is the CVSS score for CVE-2026-42048?
CVE-2026-42048 has a CVSS v3.1 base score of 9.6 (CRITICAL). The EPSS exploitation probability is 0.52%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0029 Denial of AI Service AML.T0049 Exploit Public-Facing Application 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 (DELETE /api/v1/knowledge_bases). This occurs because user-supplied knowledge base names are concatenated directly into file paths without proper sanitization or boundary validation. An authenticated attacker can exploit this flaw to delete arbitrary directories anywhere on the server's filesystem, leading to data loss and potential service disruption. This vulnerability is fixed in 1.9.0.
Exploitation Scenario
An attacker with any valid Langflow account — obtained legitimately via trial signup, compromised credentials, or insider access — sends a DELETE request to /api/v1/knowledge_bases with a JSON body like {"kb_names": ["../competitor_tenant/sensitive_kb", "../../../opt/langflow/config"]}. The delete_knowledge_bases_bulk function skips _resolve_kb_path() and concatenates the attacker-supplied name directly into the filesystem path, then calls shutil.rmtree() with no boundary check. In a multi-tenant deployment, this deletes another tenant's entire knowledge base corpus in a single request. A more destructive variant targets application config dirs or the vector store root, taking down the entire Langflow instance. No PoC tool is required — curl or Postman with a valid session token is sufficient.
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'): 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:L/UI:N/S:C/C:N/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-55255 9.9 Langflow: IDOR allows cross-user flow execution
Same package: langflow CVE-2026-33309 9.9 langflow: Path Traversal enables file access
Same package: langflow CVE-2026-33017 9.8 langflow: Code Injection enables RCE
Same package: langflow CVE-2024-37014 9.8 Langflow: unauthenticated RCE via custom component API
Same package: langflow CVE-2026-27966 9.8 langflow: Code Injection enables RCE
Same package: langflow