Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/docs/Deployment/security.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Security
slug: /security
---

The Langflow UI is an IDE and code execution platform, which means that Langflow is inherently capable of executing arbitrary,
developer-provided code.
By design, the Langflow UI includes a code editor allowing developers to author and execute arbitrary Python with full access to the host
Langflow backend process, filesystem, and network.
In addition, various components wrap and make use of code execution, in some cases using AI models to generate the code to be executed based
Comment thread
mendonk marked this conversation as resolved.
Outdated
on user input.

Langflow does not enforce isolation between users within a single Langflow process, nor does it restrict access to the local disk or network resources. Flow visibility and user access controls are designed for usability, not security enforcement. Users can access underlying database connections and system resources directly. For multi-tenant deployments, Langflow relies on infrastructure-level security rather than application-level isolation, which means it's your responsibility to enforce tenant isolation.
Comment thread
mendonk marked this conversation as resolved.
Outdated

## Secure Langflow during local development

Langflow is a code execution platform with full access to your local system.
You are responsible for ensuring the safety of flows you execute.
When Langflow will execute untrusted or LLM-generated code, consider using isolated or containerized execution environments. For more information, see [Containerize a Langflow application](/develop-application).
Comment thread
mendonk marked this conversation as resolved.
Outdated

## Secure first-party deployments

When you are serving APIs backed by flows that you or your organization authored, you are responsible for ensuring Langflow-based APIs provide security to your end users.

Use a secure API gateway to provide authentication and authorization, ensure user data is appropriately isolated, and sanitize inputs and outputs against XSS and injection attacks.
Comment thread
mendonk marked this conversation as resolved.
Outdated

For more information on setting up a reverse proxy, see [Deploy Langflow with Nginx and SSL](/deployment-nginx-ssl).
For more information on authentication configuration, see [API keys and authentication](/api-keys-and-authentication).

## Secure third-party deployments

When you are providing Langflow as a service to third parties, you must assume that any code executed by Langflow is potentially malicious.
Comment thread
mendonk marked this conversation as resolved.
Outdated

Langflow provides no isolation between tenants, so it's your responsibility to enforce isolation at the infrastructure level.

You must ensure process-level isolation to prevent tenants from sharing a single Langflow process, disk-level isolation to prevent shared access to writable persistent storage, network-level isolation to prevent access to private networks, and database-level isolation to prevent access to or modification of shared database resources.
Comment thread
mendonk marked this conversation as resolved.
Outdated

Authentication and authorization should be provided and enforced outside of the Langflow container.
Comment thread
mendonk marked this conversation as resolved.
Outdated
For shared services such as databases, enforce access limitations externally through credentials and security policies.
Comment thread
mendonk marked this conversation as resolved.
Outdated

For more information, see [Best practices for Langflow on Kubernetes](/deployment-prod-best-practices).

## Security bulletin

For the most up-to-date information about security vulnerabilities, fixes, and CVEs, see the [Langflow Security Policy](https://github.com/langflow-ai/langflow/blob/main/SECURITY.md) and [GitHub Security Advisories](https://github.com/langflow-ai/langflow/security/advisories).
Comment thread
mendonk marked this conversation as resolved.
Outdated

If you discover a security vulnerability in Langflow, please report it responsibly through the [GitHub Security tab](https://github.com/langflow-ai/langflow/security). Do not publicly disclose vulnerabilities until they have been assessed and resolved.
Comment thread
mendonk marked this conversation as resolved.
Outdated
5 changes: 5 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ module.exports = {
},
]
},
{
type: "doc",
id: "Deployment/security",
label: "Security",
},
],
},
{
Expand Down
Loading