threat intelligence

CVE-2026-5027: Path Traversal in Langflow Enables Unauthenticated File Write and Remote Code Execution

June 18, 2026 CrowdSOC Team 9 min read
CVE-2026-5027: Path Traversal in Langflow Enables Unauthenticated File Write and Remote Code Execution
← back to insights

If your organization is building AI applications, there is a reasonable chance Langflow is somewhere in your development environment. It has become one of the most widely adopted open-source platforms for assembling AI workflows, AI agents, and retrieval-augmented generation (RAG) systems, and its low-code drag-and-drop interface has made it a favorite across teams that want to move quickly. That popularity is exactly what makes the vulnerability disclosed on March 27, 2026, worth treating as an emergency.

The vulnerability is tracked as CVE-2026-5027, a high-severity path traversal flaw in Langflow's file upload functionality. It allows an attacker with no credentials whatsoever to write files to any location on the server filesystem. Active exploitation has been confirmed in the wild, with evidence of attackers already deploying this to stage remote code execution. The window for an unhurried response has closed.


What is Langflow, and why does this matter?

Langflow is an open-source visual platform for building AI applications, including AI agents, multi-agent workflows, retrieval-augmented generation (RAG) pipelines, and MCP-based automation. Rather than writing code from scratch, developers use a drag-and-drop interface to connect AI components together. It has accumulated over 149,000 GitHub stars and more than 9,200 forks, placing it firmly among the most widely deployed tools in the AI development ecosystem.

That deployment footprint is the core of why CVE-2026-5027 demands immediate attention. Censys scans identified roughly 7,000 Langflow instances publicly exposed on the internet. But those are only the internet-facing instances. Internal development servers, sandbox environments, and CI/CD pipeline tooling running Langflow are equally at risk to any attacker who already has a foothold inside your network.

The practical concern for leadership is straightforward: the infrastructure your teams use to build AI products is itself a target, and an attacker who compromises your Langflow server gains access to the systems, credentials, and data pipelines connected to it.


A note on disclosure

CVE-2026-5027 was discovered by Joshua Martinelle at Tenable. Tenable made initial contact with the Langflow project on January 20, 2026, followed by a second attempt on January 27 and a third on February 4, without receiving a response. On March 23, Tenable informed the vendor that the advisory would be published on March 27 unless they heard back. The advisory was published on that date.

At the time of Tenable's publication, no fix was noted. Snyk subsequently reported on March 30 that the issue had been addressed in langflow-base version 0.8.3, and the full Langflow application patched it in version 1.9.0, released April 15, 2026. As of June 10, 2026, the latest release is version 1.10.0, and users should target that version.

The disclosure timeline is worth noting because it means there was a gap of more than two months between the first contact attempt and public disclosure, followed by another gap before patching details became clear, during which vulnerable instances had no vendor guidance to follow.


What is CVE-2026-5027?

CVE-2026-5027 is a path traversal vulnerability in Langflow's file upload functionality. The affected component is the POST /api/v2/files endpoint, which handles file uploads used in AI workflows.

The root cause

The issue exists because the upload functionality trusts the multipart filename value provided by the client. Instead of generating a safe server-side storage name or constraining the resolved path to a dedicated upload directory, the vulnerable code path allows traversal sequences such as ../ to influence the final destination path. As a result, an attacker can escape the intended storage root and force the application to write files to arbitrary locations on the server filesystem.

At a conceptual level, the code is doing something analogous to:

save_path = base_dir / file.filename

If an attacker supplies a filename like ../../../../etc/cron.d/backdoor, the resulting path escapes the intended upload directory entirely and writes to the system cron configuration instead.

The authentication problem

What makes this dramatically worse is a Langflow default configuration choice. Because Langflow enables unauthenticated auto-login by default, no credentials are required to reach the vulnerable endpoint, and a single unauthenticated request is sufficient to obtain a valid session token before proceeding with exploitation.

This means any attacker who can reach the Langflow port over the network has everything they need. There is no password to guess, no account to compromise, and no prior access requirement.

What an attacker can do

The immediate impact is arbitrary file write: an attacker can place any content they choose at any location the Langflow process has permission to write to. Depending on how Langflow is deployed and what privileges its process runs under, this includes:

  • Overwriting application code or configuration files
  • Writing to system cron job directories to achieve persistent execution
  • Modifying shell initialization files or SSH authorized keys
  • Replacing startup scripts or scheduled task definitions

Depending on the runtime privileges of the Langflow process, this may enable overwrite of application files, modification of startup or scheduled task files, persistence through shell initialization or key files, and escalation from arbitrary file write to remote code execution.

The GitHub repository for this CVE documents a specific exploitation scenario: RCE via cron job injection. By writing an attacker-controlled cron job entry through the path traversal, the attacker achieves persistent, scheduled command execution on the server. This technique has already been observed in active exploitation.


Active exploitation: what we know

VulnCheck's honeypots detected attackers exploiting the vulnerability to drop test files on vulnerable instances. Test file writes are typically the first stage of exploitation, used to confirm that a target is vulnerable before proceeding to more destructive or persistent actions.

The attack effort follows a flurry of exploitation activity targeting other Langflow vulnerabilities this year, including CVE-2026-0770, CVE-2026-33017, CVE-2026-21445, and CVE-2025-34291, the last of which has been weaponized by the Iranian state-sponsored group known as MuddyWater.

This context matters: Langflow has been a consistent and productive target for threat actors throughout 2026, including sophisticated nation-state actors. The pattern suggests that adversaries have invested effort in understanding Langflow's attack surface, and new vulnerabilities in the platform are being operationalized quickly.

The activity underscores a growing trend of attackers targeting the infrastructure and tooling that organizations use to build and deploy AI applications.


Who is affected?

CVE-2026-5027 affects Langflow versions 1.8.4 and earlier. The vulnerability was patched in langflow-base 0.8.3 and Langflow 1.9.0, with the current recommended version being 1.10.0.

The risk is concentrated in any environment where:

Langflow is internet-exposed. An instance reachable from the public internet with default settings (auto-login enabled) is trivially exploitable with a single HTTP request and no credentials.

Langflow is on an internal network with untrusted users. Any environment where interns, contractors, temporary staff, or other potentially untrusted parties share network access with a Langflow instance is at risk.

Containerized and cloud deployments. Langflow is widely deployed inside Docker containers and Kubernetes pods. The vulnerability lives at the application layer, not the infrastructure layer, so cloud provider protections do not mitigate it.

Development, staging, and sandbox environments. These are frequently overlooked during patching cycles and often run with permissive configurations. They also frequently share credentials or network access with production systems.

CI/CD pipelines. Automated build and test systems that interact with Langflow instances represent a supply-chain risk: a compromised Langflow server in a build pipeline can inject malicious output into the software your organization ships.


What should you do?

1. Identify your Langflow instances

Before anything else, find every Langflow instance running in your environment. This includes developer laptops, internal servers, cloud instances, container workloads, and any vendor or managed service that may run Langflow on your behalf. This class of tool tends to proliferate across AI development teams without centralized visibility.

To check the version of a running Langflow instance:

# Check package version if installed via pip
pip show langflow

# Check running container version
docker inspect <container_name> | grep -i langflow

Any instance running version 1.8.4 or earlier is affected.

2. Upgrade to Langflow 1.10.0 immediately

The definitive fix is upgrading to the latest release. For pip-based installations:

pip install --upgrade langflow

For Docker deployments, pull the latest image:

docker pull langflowai/langflow:latest
docker stop <container_name>
docker rm <container_name>
# Relaunch with your existing volume mounts and environment variables

After upgrading, verify the running version:

langflow --version

For Kubernetes deployments, update your pod specification to reference the patched image tag and perform a rolling restart:

kubectl set image deployment/langflow langflow=langflowai/langflow:1.10.0
kubectl rollout status deployment/langflow

3. If you cannot patch immediately: restrict network access

If an immediate upgrade is not possible, the most effective interim control is removing network exposure. Langflow development instances should never be internet-accessible; if yours are, take them offline or place them behind a VPN or firewall rule that restricts access to named, trusted IP addresses only.

# Example: restrict access to specific IP range using iptables
iptables -A INPUT -p tcp --dport 7860 -s <trusted_IP_range> -j ACCEPT
iptables -A INPUT -p tcp --dport 7860 -j DROP

Langflow's default port is 7860. Adjust for any custom configuration.

4. Disable unauthenticated auto-login

Langflow's default auto-login setting is a significant factor in the severity of this vulnerability. Requiring authentication adds a barrier that, while not a substitute for patching, meaningfully raises the bar for unauthenticated exploitation. To enforce authentication, set the following environment variable before starting Langflow:

LANGFLOW_AUTO_LOGIN=false

Or in your .env file:

LANGFLOW_AUTO_LOGIN=false

Restart Langflow after making this change and verify that the login prompt is presented before the application UI loads.

5. Review filesystem permissions

Apply the principle of least privilege to the Langflow process. If Langflow is running as root or with broad filesystem write permissions, the impact of the arbitrary file write vulnerability is maximized. Restrict the process to write only within its intended working directory:

# Run Langflow as a dedicated low-privilege user
useradd -r -s /bin/false langflow
sudo -u langflow langflow run

For Docker deployments, set a non-root user in your container specification:

securityContext:
  runAsNonRoot: true
  runAsUser: 1000

This does not fix the vulnerability, but it limits what an attacker can do if they exploit it.

6. Check for signs of prior exploitation

If your instances were exposed before patching, review for indicators of compromise. Focus on locations an attacker would target for persistence:

# Check for unexpected files in cron directories
ls -la /etc/cron.d/ /etc/cron.daily/ /etc/cron.hourly/
# Check for recently modified SSH authorized_keys files
find /home /root -name "authorized_keys" -newer /tmp -ls
# Check Langflow upload directory for suspicious filenames
find /path/to/langflow/uploads -name "*.." -o -name "*/../*"
# Review recent outbound connections from the Langflow process
ss -tp | grep langflow

Unexpected cron entries, new SSH keys, or unfamiliar files in system directories are indicators of successful exploitation.


Detection

Unlike some of the vulnerabilities covered in recent weeks, CVE-2026-5027 does leave detectable traces in application logs.

The exploitation request is an HTTP POST to /api/v2/files with a crafted multipart filename. In Langflow's access logs, look for upload requests where the filename parameter contains ../ sequences:

grep 'POST /api/v2/files' /path/to/langflow/logs/access.log | grep -E '\.\./'

At the filesystem level, any file appearing outside the designated Langflow upload directory, particularly in system directories like /etc/, /tmp/, or home directories, warrants immediate investigation.

For SIEM environments, route Langflow application logs and file system audit events (via auditd or equivalent) and alert on:

  • POST requests to /api/v2/files from unexpected source IPs
  • File creation events outside the Langflow working directory by the Langflow process
  • New or modified cron entries occurring outside normal change windows
  • Unexpected modifications to SSH authorized_keys files

The broader AI tooling security picture

CVE-2026-5027 is not an isolated incident. It is the fifth Langflow vulnerability exploited in active attacks in 2026 alone. The platform has also seen exploitation by a nation-state actor. This pattern reflects a broader reality that is worth stating plainly: the tools organizations use to build AI systems are themselves high-value targets.

AI development platforms sit in a privileged position in the software stack. They often have access to proprietary data, model weights, API credentials for third-party AI services, and connections to production systems. A compromised Langflow server is not just a compromised web server; it is a potential window into the AI infrastructure an organization depends on.

As AI tooling adoption accelerates, the security rigor applied to these platforms should match the level applied to any other critical internal infrastructure. That means patch management, network segmentation, access controls, and monitoring, applied consistently, not just to traditional web applications.


Summary

CVE CVE-2026-5027
Type Path Traversal / Arbitrary File Write
Component Langflow POST /api/v2/files endpoint
CVSS v3.1 Score 8.8 (High)
CVSS v4 Score 8.7 (High)
Discovered by Joshua Martinelle (Tenable)
Disclosed March 27, 2026 (public); patch available April 15, 2026
Affected versions Langflow 1.8.4 and earlier
Fixed version Langflow 1.9.0+; recommend updating to 1.10.0
Authentication required? No, auto-login is enabled by default
Immediate impact Unauthenticated arbitrary file write to any path the process can reach
Full RCE? Yes, via cron job injection and other techniques
Active exploitation? Yes, confirmed by VulnCheck honeypot data
Nation-state interest? Yes; MuddyWater (Iran) has targeted Langflow CVEs in 2026
Interim mitigation Restrict network access; disable auto-login (LANGFLOW_AUTO_LOGIN=false)
Full fix Upgrade to Langflow 1.10.0

With roughly 7,000 Langflow instances exposed to the public internet, active exploitation already underway, and a track record of nation-state actors targeting this platform in 2026, this is a vulnerability that should not wait for a scheduled maintenance window. The upgrade path is straightforward, and the interim mitigations are one-line configuration changes.

If you need help inventorying your Langflow deployments, applying hardening controls, or reviewing your AI development infrastructure for similar exposure, get in touch. The security posture of your AI tooling deserves the same attention as the AI products you build with it.

← all insights
CrowdSOC Team · June 18, 2026