Skip to main content
Mallory
HighPublic exploit

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

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

CVE-2026-5027 is a high-severity path traversal vulnerability in Langflow affecting the POST /api/v2/files upload endpoint. The flaw exists because the application does not properly sanitize the filename parameter supplied in multipart form data. By including traversal sequences such as '../' in the filename, an attacker can cause Langflow to write an uploaded file to arbitrary locations on the underlying filesystem instead of the intended upload directory. Multiple sources in the provided content state that this arbitrary file write condition can be leveraged for remote code execution, particularly in deployments where a written file can be placed in a location that is executed or loaded by the application or host environment.

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 filesystem paths on the target server. This can compromise integrity directly and, depending on where files are written, can also lead to remote code execution, service disruption, configuration tampering, persistence, or exposure of sensitive data. The provided content explicitly notes that the issue has high confidentiality, integrity, and availability impact and that in-the-wild exploitation has already been observed.

Mitigation

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

If immediate patching is not possible, restrict or disable access to the vulnerable POST /api/v2/files endpoint, especially from untrusted networks. Disable Langflow's unauthenticated auto-login behavior where possible, require authentication in front of the application, and place the service behind network access controls or a reverse proxy. Monitor for suspicious file-upload activity and unexpected file creation outside normal upload paths, particularly filenames containing traversal patterns such as '../'.

Remediation

Patch, then assume compromise.

Upgrade Langflow to a fixed release. The provided content states the issue was fixed in langflow-base 0.8.3 and in Langflow 1.9.0, and also recommends upgrading to the latest available Langflow release, noted in the content as 1.10.0. Remediation should include ensuring the filename parameter is strictly sanitized and normalized server-side, rejecting traversal sequences and absolute paths, and constraining writes to an intended upload directory.
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 activity32

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