Langflow OSS — Authenticated RCE via Unsafe Execution of Custom Component Class Definitions (CVE-2026-107328)
Published: 2026-11-25 • Researcher: Richard Howe (rmhowe425) — PoC; IBM PSIRT — advisory
- Severity
- Critical
- CVE
- CVE-2026-107328
- Category
- web
- Affected product
- IBM Langflow OSS (Langflow AI application builder; custom component API at /api/v1/custom_component)
- Affected versions
- 1.0.0 through 1.12.4 (NVD: >=1.0.0, <1.12.5); fixed in 1.12.5
- Disclosed
- 2026-11-25
- Patch status
- Patched
Tags
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-10-26 |
| Author / Researcher | Richard Howe (rmhowe425) — PoC; IBM PSIRT — advisory |
| CVE / Advisory | CVE-2026-107328 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.9 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H; IBM, NVD secondary). NVD primary score is 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) |
| Status | Weaponized |
| Tags | RCE, code-injection, CWE-94, Langflow, AI-platform, Python, authenticated, post-auth, custom-component, FastAPI |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | IBM Langflow OSS (Langflow AI application builder; custom component API at /api/v1/custom_component) |
| Versions Affected | 1.0.0 through 1.12.4 (NVD: >=1.0.0, <1.12.5); fixed in 1.12.5 |
| Language / Platform | Python (PoC); Langflow server is Python/FastAPI, typically deployed with pip, Docker or Langflow Desktop on Linux / macOS / Windows |
| Authentication Required | Yes — any authenticated user (low privileges, not admin-only) |
| Network Access Required | Yes |
Summary
IBM Langflow OSS 1.0.0 through 1.12.4 allows a remote authenticated attacker to execute arbitrary code because the custom component API builds attacker-supplied Python class definitions without neutralising code passed to eval or exec, classified by NVD as CWE-94. The archived PoC logs in with valid credentials, posts a crafted component definition to the custom component endpoint, and places an operating system command in the class body so it runs when the definition is evaluated by the Langflow server process. Command output is reported back through the API response and the container filesystem, so a low-privileged Langflow account is enough to gain code execution on the host serving the flows. IBM scores the bug 9.9 with scope changed; NVD’s primary score is 8.8.
Vulnerability Details
Root Cause
Langflow lets users define custom components in Python and validates/prepares them through the POST /api/v1/custom_component endpoint. The server compiles and evaluates the supplied source so it can introspect the component class and build a frontend node. That evaluation is not restricted to declarative component metadata: any top-level statement and any class body expression runs in the server interpreter with the privileges of the Langflow process. Because the source comes straight from an authenticated API caller and is passed into the Python code-evaluation path (eval/exec) without sanitisation or sandboxing, a class body such as _rce = subprocess.check_output(...) executes at class-definition time. This is the “execute arbitrary class definitions” issue in IBM’s bulletin.
Attack Vector
- Authenticate with any valid Langflow account:
POST /api/v1/login(form fieldsusernameandpassword) returns anaccess_token; the PoC sends it asAuthorization: Bearer <token>. - Submit attacker-controlled Python to
POST /api/v1/custom_componentas JSON{"code": "<component source>", "frontend_node": {}}. - The server compiles/evaluates the source; a class body statement such as
_rce = _sp.check_output("<cmd>", shell=True)runs immediately, giving arbitrary command execution inside the Langflow server. - The endpoint returns HTTP 200 with a JSON component description even though the side effect has already happened, so the bug is trivially repeatable.
Omit the command and the PoC instead submits _rce = 1 / 0; the resulting ZeroDivisionError proves the class body was evaluated — a blind oracle for instances where stdout is not reflected.
Impact
Remote code execution as the account running the Langflow server. In the common Docker deployment that process holds flow definitions, provider API keys, database credentials and knowledge-base material, and it usually has outbound network access to LLM providers. An attacker with only a normal (non-admin) Langflow login can therefore run commands, read or alter flows and secrets, pivot into connected services, or persist via the flow store. The CVSS scope change (S:C) reflects that the compromise escapes the application’s intended user boundary.
Environment / Lab Setup
OS: Linux (Ubuntu 22.04 used by the author), or any Docker host
Target: Langflow OSS 1.10.0 tested by the author; affected range 1.0.0 - 1.12.4
Attacker: Any host with network access to the Langflow HTTP port (default 7860)
Tools: Python 3.10+, requests, curl, DockerSetup Steps
The upstream repository contains only the PoC and a short usage README, with no lab bootstrap; the steps below are the generic deployment.
| |
Proof of Concept
Step-by-Step Reproduction
- Obtain credentials — a normal Langflow account is enough; no admin role is required.Shell script
1 2curl -s -X POST http://127.0.0.1:7860/api/v1/login \ -d 'username=user@example.com&password=passw0rd' - Submit a benign probe — send a class body that raises, to confirm the server evaluates the source.Shell script
1 2 3curl -s -X POST http://127.0.0.1:7860/api/v1/custom_component \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"code":"class _Trigger:\n _rce = 1 / 0\n","frontend_node":{}}' - Run the archived PoC — replace the probe with an OS command.Shell script
1 2python3 poc.py --url http://127.0.0.1:7860 --username user@example.com \ --password 'passw0rd' -c 'id' - Verify execution — the class body executes during component evaluation; check the response and the target container.Shell script
1docker exec langflow sh -c 'cat /tmp/rce_proof 2>/dev/null' # or any command you ran
Exploit Code
See
poc.pyand the upstream notes inupstream-README.md.
| |
Expected Output
| |
Upstream screenshots additionally show the command’s effect inside the Langflow Docker container (the filesystem listing produced by the supplied command). The blind probe variant (-c omitted) surfaces a ZeroDivisionError, which by itself proves the class body was evaluated.
Detection & Indicators of Compromise
POST /api/v1/custom_componentrequests from non-admin or newly created accounts, especially with largecodebodies orfrontend_nodeset to{}.- Component source containing
subprocess,os.system,popen,check_output,__import__,eval,exec,socket, or base64 blobs. - Langflow process (
python/uvicorn) spawning shell children such as/bin/sh -c ...,id,whoami,curl,wget, or reverse-shell binaries. - New files in
/tmpor the container working tree, or outbound connections from the Langflow container to unexpected hosts. - Langflow server errors that include
ZeroDivisionErroror other class-body exceptions raised during component construction — the probe pattern.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade Langflow OSS to 1.12.5 or later (IBM advisory), back up flows first, then restart the Langflow service so the new code is loaded. |
| Workaround | IBM lists LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY=true (block non-admin custom component use) and LANGFLOW_MCP_SERVER_INTERPRETER_HARDENING=true for MCP stdio deployments; these reduce exposure but do not replace the upgrade. Keep LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS unset/disabled. |
| Config Hardening | Run Langflow as a non-root, unprivileged user in an isolated container with no host mounts; restrict who can register accounts; add network egress filtering; monitor and alert on custom component submissions; rotate any provider keys or database credentials reachable from the instance. |
References
Notes
Auto-ingested from https://github.com/rmhowe425/POC-CVE-2026-107328 on 2026-11-25. Review verdict: real exploit code, ingested. The repository is a two-file PoC (poc.py plus a screenshot-based README) that drives the live custom component endpoint with a full login and a command payload — it is not a scanner, checker or audit tool. No license file is present, so the single source file is archived with attribution for authorized research only.
Limitations: a valid Langflow account is required, so this is post-auth only (CVSS PR:L, 9.9 with scope changed). Execution happens when the class body is evaluated during component build/validation; whether the command’s stdout is returned in the API JSON depends on the instance, which is why the PoC’s no-command mode uses a deliberate ZeroDivisionError as an oracle. The code path is exercised against Langflow 1.10.0 per the author’s header; the NVD/IBM range 1.0.0–1.12.4 is used in this entry.
Code quirks: poc.py calls sys.exit(1) on a failed login without importing sys, so a bad credential raises NameError instead of a clean message; the component is also labelled CVE-2026-18729-Probe, a different Langflow CVE id, even though the repository is filed under CVE-2026-107328. Upstream README images are hosted on GitHub user attachments and were not archived.
Related archived Langflow entries: pocs/web/2026-11-25_cve-2026-93680-langflow (MCP SSE auth bypass) and pocs/web/2026-07-05_cve-2026-33017-langflow-rce. Run only against systems you own or have written authorization to test.
| |