Critical

Langflow Knowledge Bases API is Vulnerable to Path Traversal

  • Disclosed: 05.05.2026
  • Updated: 11.10.2026 14:17

Summary

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.

Details

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.

PoC (Proof of Concept)

For the Bulk Delete endpoint, an authenticated attacker can supply a traversal sequence in the kb_names parameter: ../victim_user/kb_name

Because the path is passed directly to shutil.rmtree() without containment checks, this payload deletes directories outside the intended scope.

Impact

Any Langflow instance exposing this endpoint to authenticated users is vulnerable. This exposes the server to:

  • Cross-user data compromise: Deletion of directories within another tenant's knowledge base space.
  • Arbitrary filesystem manipulation: Directory deletion at any path on the server where the application has write permissions.
  • Service disruption & Data Loss: Deletion of critical application files or unrecoverable data loss if backups are co-located on the same filesystem.

Fixes

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.

Acknowledgements

Thanks to the security researchers who responsibly disclosed this vulnerability:

  • @ddlxstudio
  • @nekros1xx

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) langflow < 1.9.0 1.9.0

References

CVSS score 9.6/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
Weakness (CWE)
CWE-22
Platform
Python (PyPI)
Package
langflow
Disclosed
05.05.2026
Updated
11.10.2026 14:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-9whx-c884-c68q - CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2026-377 - PyPA Advisory Database; CC BY 4.0

Vulnerability history: langflow

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (42) in the archive
Total entries
42
First → latest
06.2024 10.2026
Without a fix
7
Exploited in attacks
5

Severity breakdown

  • Critical 15
  • High 17
  • Medium 7
  • Low 3

Disclosures per year

  1. 2024: 4
  2. 2025: 5
  3. 2026: 33
Severity:
  1. Critical · 9.1 CVE-2026-9205 < 1.10.1 1.10.1
  2. Critical · 9.8 CVE-2026-8505 >= 1.7.0, < 1.9.1 1.9.1
  3. High · 8.8 CVE-2026-7700 >= 1.3.0, < 1.10.3 1.10.3
  4. Critical · 9.6 CVE-2026-48519 < 1.9.2 1.9.2
  5. Langflow Knowledge Bases API is Vulnerable to Path Traversal this entry
    Critical · 9.6 CVE-2026-42048 < 1.9.0 1.9.0
  6. High · 7.5 CVE-2026-33484 >= 1.0.0, < 1.9.0 1.9.0
  7. Critical · 9.9 CVE-2026-33309 >= 1.2.0, < 1.9.0 1.9.0
Show more (12) Showing 20 of 32

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.