Skip to main content
Mallory
HighPublic exploit

Langflow POST /api/v2/files Path Traversal Arbitrary File Write

IdentifiersCVE-2026-5027CWE-22· Improper Limitation of a Pathname…

CVE-2026-5027 is a path traversal vulnerability in Langflow affecting the POST /api/v2/files endpoint. The endpoint does not properly sanitize the filename parameter supplied in multipart form data, allowing traversal sequences such as ../ to be used to escape the intended upload directory and write files to arbitrary filesystem locations. Reporting indicates this arbitrary file write condition can be leveraged for remote code execution in Langflow deployments. Supporting reporting also notes that Langflow enables unauthenticated auto-login by default, making the vulnerable workflow reachable without credentials in default configurations because an attacker can obtain a valid session token with a single unauthenticated request before exploiting the file-write flaw.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker to write attacker-controlled files to arbitrary locations on the target filesystem. Depending on writable paths and application/runtime behavior, this can lead to remote code execution. The published CVSS vector and reporting indicate high impact to confidentiality, integrity, and availability. Observed in-the-wild activity has reportedly used the flaw to write test files on victim systems, demonstrating practical exploitation.

Mitigation

If you can’t patch tonight, do this now.

Until a patch is applied, restrict or disable exposure of Langflow instances to untrusted networks, especially internet-facing deployments. Disable or harden default unauthenticated auto-login behavior where possible, require authentication in front of the application, and place Langflow behind a reverse proxy, VPN, or other access control layer. Monitor for suspicious requests to POST /api/v2/files containing traversal patterns such as ../ and for unexpected file creation in application, web, startup, or other sensitive filesystem paths. Limit filesystem permissions for the Langflow process to reduce the impact of arbitrary file writes.

Remediation

Patch, then assume compromise.

Apply the vendor/project fix for CVE-2026-5027 when available from Langflow. The vulnerable code path should be corrected by sanitizing and validating the filename parameter in POST /api/v2/files, rejecting traversal sequences and ensuring uploaded files are constrained to an intended directory. If an official patch is available, upgrade Langflow to the remediated version and verify that arbitrary path components in multipart filenames are no longer honored.
PUBLIC EXPLOITS

Exploits

4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos.

VALID 4 / 4 TOTALView more in app
CVE-2026-5027MaturityPoCVerified exploit

Small standalone Python exploit repository for CVE-2026-5027 targeting Langflow <= 1.8.4. Repository contains three files: a README describing the vulnerability and usage, a single executable exploit script (exploit.py), and requirements.txt listing the requests dependency. The exploit is not part of a larger framework. The main capability is arbitrary file write via path traversal in Langflow's multipart upload handling at POST /api/v2/files. The script first obtains an access token either by calling /api/v1/auto_login (default unauthenticated path) or by authenticating to /api/v1/login with provided credentials. It then abuses the filename field in the multipart upload by prepending repeated ../ traversal segments to a chosen remote path, allowing writes outside the intended storage directory. Two operating modes are implemented: (1) proof-of-concept mode writes a timestamped marker file to /tmp/CVE-2026-5027-proof.txt to confirm traversal and arbitrary write; (2) exploitation mode overwrites /etc/crontab with a cron payload that runs /bin/bash and connects back to an attacker-supplied lhost:lport using bash's /dev/tcp feature, yielding root-level remote code execution if cron processes the file. The exploit reports the returned server-side path from the API response and prints a completion summary. Overall, this is a real exploit rather than a detector. It is operational and weaponized enough for direct use against exposed Langflow instances, but payload customization is limited to the supplied reverse-shell host and port.

yahiahamzaDisclosed Apr 2, 2026pythonwebnetwork
CVE-2026-5027MaturityPoCFrameworknucleiVerified exploit

Repository contains a small exploit set for alleged CVE-2026-5027 affecting Langflow. The main artifact is CVE-2026-5027.py, a standalone Python exploit that first attempts an unauthenticated/auto-login flow against /api/v2/login and /api/v2/auth, then abuses POST /api/v2/files by supplying a traversal filename in multipart upload data. It supports two modes: a safer proof mode that writes a marker file into /tmp, and an RCE mode that writes ../../../etc/crontab with a cron entry executing a bash reverse shell to an attacker-supplied host and port. The repository also includes CVE-2026-5027.yaml, a Nuclei template that targets the same /api/v2/files endpoint and attempts a proof write to ../../../tmp/CVE-2026-5027-nuclei-proof.txt, primarily for scanning/validation. README.md documents the vulnerability, usage, and expected outcomes. Overall, this is an operational web/network exploit for arbitrary file write leading to Linux RCE, with both exploitation and scanning components present.

0xBlackashDisclosed Apr 3, 2026pythonyamlwebnetwork
CVE-2026-5027MaturityPoCVerified exploit

Repository contains a working Python exploit and a Dockerized lab environment for CVE-2026-5027, a Langflow <= 1.8.4 path traversal/arbitrary file write vulnerability. The main exploit file, CVE-2026-5027.py, performs a two-stage attack: it first obtains a bearer token either from unauthenticated auto-login at /api/v1/auto_login or via credentials at /api/v1/login, then abuses POST /api/v2/files by supplying a multipart filename prefixed with repeated ../ traversal sequences to write attacker-controlled content outside the upload directory. The exploit supports two outcomes: a safe proof mode that writes /tmp/CVE-2026-5027-proof.txt, and an RCE mode that writes a cron file under /etc/cron.d containing a bash reverse shell to an attacker-supplied host and port. The payload path is randomized with timestamp and sanitized host components to avoid filename deduplication. Repository structure is small and purpose-built: one Python exploit, one README, and three lab-support files. The Dockerfile builds an Ubuntu-based vulnerable environment with langflow==1.8.4, cron, and inotify-tools, and enables LANGFLOW_AUTO_LOGIN=True on port 9013. docker-entrypoint.sh starts a watcher and cron before launching Langflow. watch-etc-cron-files.sh monitors /etc for files whose names begin with cron and executes them with /bin/sh, making exploitation in the lab immediate and deterministic. Overall, this is an operational exploit PoC for unauthenticated or weakly authenticated arbitrary file write leading to remote code execution in Langflow deployments, especially those with auto-login enabled and writable sensitive filesystem locations.

EQSTLabDisclosed Apr 3, 2026pythondockerfilewebnetwork
CVE-2026-5027MaturityPoCVerified exploit

Small standalone exploit repository with 2 files: a README describing CVE-2026-5027 and a single Python exploit script, poc.py. The script targets Langflow <= 1.8.4 and abuses path traversal in the multipart filename sent to POST /api/v2/files, allowing arbitrary file write outside the intended upload directory. The exploit first attempts to obtain an access token either through unauthenticated auto-login at /api/v1/auto_login or via credentialed login at /api/v1/login. It then crafts a filename prefixed with repeated ../ sequences and uploads attacker-controlled content to an arbitrary server path. Two modes are implemented: a proof mode that writes /tmp/CVE-2026-5027-proof.txt, and an RCE mode that writes a cron file under /etc/cron.d/ containing a bash reverse shell to an attacker-supplied host and port. The code is operational rather than a simple detector because it performs the full exploitation chain and includes a working payload. The repository is not part of a larger exploit framework.

min8282Disclosed Apr 3, 2026markdownpythonwebnetwork
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity26

Community discussion across Reddit, Mastodon, and other social sources.