LANGFLOW · CVE-2026-42048 · AI agents & MCP
FIX → 1.9.0
Langflow's bulk delete endpoint for Knowledge Bases builds file paths from user-supplied names without checking them, so path traversal sequences are accepted. An authenticated attacker can make the server call a recursive delete on arbitrary directories, including other users' knowledge bases.
first public Apr 27, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Any Langflow instance that exposes the Knowledge Bases API to authenticated users is exposed through the bulk delete endpoint (DELETE /api/v1/knowledge_bases). Instances where only trusted operators can log in, or that do not run Langflow, can skip it.
Not affected if langflow-1.9.0-or-later, no-multi-user-access
Who cares ai-apps, langflow, python, self-hosted
pip show langflow; versions 1.8.4 and earlier are affected.Upgrade 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.
The vulnerability exists in the delete_knowledge_bases_bulk function within src/backend/base/langflow/api/v1/knowledge_bases.py.
This function constructs file paths directly from the user-supplied kb_names parameter. While other knowledge base endpoints safely route through standard path resolution (e.g., _resolve_kb_path()), the bulk delete handler bypasses this entirely. It builds the path manually and passes it directly to shutil.rmtree() without validating if the resulting path resolves outside the intended user directory.
For the Bulk Delete endpoint, an authenticated attacker can supply a traversal sequence in the kb_names parameter:
../victim_user/kb_name
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
langflow upgrade to 1.9.0 or later (fixed in PR #12243, with containment checks backported from PR #12337).Because the path is passed directly to shutil.rmtree() without containment checks, this payload deletes directories outside the intended scope.
Any Langflow instance exposing this endpoint to authenticated users is vulnerable. This exposes the server to:
The issue was addressed in PR #12243, which applies Path.resolve() to normalize the supplied path and validates that it starts with the authenticated user's directory before deletion. Subsequent updates (backported from PR #12337) introduced robust containment checks using Path.is_relative_to() to prevent prefix-ambiguity bugs.
Thanks to the security researchers who responsibly disclosed this vulnerability:
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.