🛡️ CVE-2026-42048 — langflow
Description
Langflow Knowledge Bases API is Vulnerable to Path Traversal
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
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality none, integrity high, availability high.
Weakness class
CVE-2026-42048 is classified as CWE-22: Path Traversal. A file path built from user input is not confined to the intended directory, letting an attacker reach files elsewhere on the filesystem.
Affected software
CVE-2026-42048 is recorded against 2 packages.
- langflow (fixed in 1.9.0)
- unknown
Timeline and source
Published on 5 May 2026 and last revised on 13 July 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.
References
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| langflow | — | 1.9.0 |
| unknown | — | — |
References
Similar Threats
- Medium CVE-2026-10128
- High CVE-2026-10129
- Critical CVE-2026-10134
- Critical CVE-2026-10140
- High CVE-2026-10546
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Exploit Protection
Are you running langflow?
CVE-2026-42048 carries CVSS 9.6 Critical rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-42048 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.