# CVE-2026-42867: Langflow path traversal in Knowledge Bases API

Source: https://junglewise.ai/threats/cve-2026-42867-langflow-path-traversal-in-knowledge-bases-api  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-42867 · Severity: medium · CVSS 6.5 · Published 2026-06-23

Langflow is a platform used to build and deploy AI-powered workflows and agents. A security flaw in its Knowledge Bases component allows users to bypass folder restrictions by providing specially crafted names. This could allow an attacker to create unauthorized folders or overwrite specific configuration files elsewhere on the server, potentially leading to data corruption or interference with other users' work.

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

## Quick answers

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

**How severe is CVE-2026-42867?** Medium severity, with a CVSS score of 6.5, published 23 June 2026.

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

**Is there a fix for CVE-2026-42867?** 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-42867 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-42867?** 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 `create_knowledge_base` function within `src/backend/base/langflow/api/v1/knowledge_bases.py`. The `POST /api/v1/knowledge_bases` endpoint fails to sanitize the user-supplied `name` field before using it to construct file paths via `kb_path.mkdir()`. An attacker can use traversal sequences (e.g., `../`) or absolute paths to create directories and write application-specific files (`embedding_metadata.json` and `schema.json`) outside the intended root directory. This can result in cross-user data compromise or arbitrary filesystem manipulation. The issue is resolved in version 1.9.0 by implementing strict path validation using `Path.is_relative_to()`.

## Affected products

- langflow-ai Langflow < 1.9.0

## Identifiers

- CVE-2026-42867
- GHSA-79ph-745m-6wxq
- PYSEC-2026-2566

## Timeline

- 2026-03-26: patched: Fix merged into release-1.9.0 branch
- 2026-06-11: advisory: GitHub Security Advisory published
- 2026-06-23: disclosed: CVE published to NVD

## References

- [https://github.com/langflow-ai/langflow/pull/12337](https://github.com/langflow-ai/langflow/pull/12337)
- [https://github.com/langflow-ai/langflow/security/advisories/GHSA-79ph-745m-6wxq](https://github.com/langflow-ai/langflow/security/advisories/GHSA-79ph-745m-6wxq)

## 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)
