# CVE-2026-42048: Langflow path traversal in Knowledge Bases API bulk delete

Source: https://junglewise.ai/threats/cve-2026-42048-langflow-path-traversal-in-knowledge-bases-api-bulk-delete  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-12. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-42048 · Severity: critical · CVSS 9.6 · Published 2026-05-12

Langflow, a tool for building AI-powered workflows, contains a security flaw in its Knowledge Bases API. An authenticated user can exploit this vulnerability to delete arbitrary folders and files across the server's entire storage system. This can lead to permanent data loss, the deletion of other users' work, and significant service outages.

Technologies: [langflow (PyPI)](https://junglewise.ai/threats/technologies/pypi-langflow). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-42048 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42048 being exploited in the wild.

**How severe is CVE-2026-42048?** Critical severity, with a CVSS score of 9.6, published 12 May 2026.

**Which products and versions are affected?** langflow (PyPI) ECOSYSTEM:introduced=0,fixed=1.9.0.

**Is there a fix for CVE-2026-42048?** Yes. langflow (PyPI): upgrade to 1.9.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42048 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-42048?** Check whether you run langflow (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- langflow (PyPI): upgrade to 1.9.0 or later

  ```sh
  pip install "langflow>=1.9.0"
  ```


## Technical details

A path traversal vulnerability exists in the `delete_knowledge_bases_bulk` function within `src/backend/base/langflow/api/v1/knowledge_bases.py`. The endpoint `DELETE /api/v1/knowledge_bases` fails to sanitize the `kb_names` parameter, concatenating user input directly into file paths used by `shutil.rmtree()`. By supplying traversal sequences (e.g., `../`), an authenticated attacker can bypass intended directory boundaries to delete any directory the application process has permissions to modify. The vulnerability was fixed in version 1.9.0 by implementing path normalization and strict containment checks using `Path.is_relative_to()`.

## Affected products

- langflow-ai Langflow < 1.9.0

## Identifiers

- CVE-2026-42048
- GHSA-9whx-c884-c68q
- PYSEC-2026-377

## Timeline

- 2026-04-27: advisory: GitHub Security Advisory published
- 2026-05-12: disclosed: CVE-2026-42048 published to NVD

## References

- [https://github.com/langflow-ai/langflow/security/advisories/GHSA-9whx-c884-c68q](https://github.com/langflow-ai/langflow/security/advisories/GHSA-9whx-c884-c68q)

## Related threats

- [Langflow SSRF in URL-taking components](https://junglewise.ai/threats/langflow-ssrf-in-url-taking-components-protection-disabled-by-default-db7cac37)
- [Langflow IP spoofing in MCP configuration installation](https://junglewise.ai/threats/cve-2026-105741-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow path traversal and cross-user disclosure in MCP resources](https://junglewise.ai/threats/cve-2026-105699-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow authorization bypass in flow API endpoints](https://junglewise.ai/threats/cve-2026-105698-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow MCP stdio command injection](https://junglewise.ai/threats/cve-2026-105697-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
