Langflow OSS — Authenticated RCE via Callback Argument Injection in Custom Component Update (CVE-2026-107329)
Published: 2026-11-25 • Researcher: Richard Howe (rmhowe425) — PoC; IBM PSIRT — advisory
- Severity
- Critical
- CVE
- CVE-2026-107329
- Category
- web
- Affected product
- IBM Langflow OSS (Langflow AI application builder; custom component update endpoint /api/v1/custom_component/update)
- 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-107329 |
| 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, argument-injection |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | IBM Langflow OSS (Langflow AI application builder; custom component update endpoint /api/v1/custom_component/update) |
| 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, no admin role needed) |
| Network Access Required | Yes (HTTP to the Langflow port, default 7860) |
Summary
IBM Langflow OSS 1.0.0 through 1.12.4 allows a remote authenticated attacker to execute arbitrary code because the custom component update endpoint compiles an attacker-supplied Python component and then invokes the component’s build-config update callback with an argument taken directly from the request, classified by NVD as CWE-94. The archived PoC authenticates with a normal account, submits a component whose build-config callback runs its field value through a shell, and passes the operating system command as that field value. Langflow compiles the class and dispatches the callback, so the command runs in the Langflow server process while the request still returns HTTP 200. IBM scores the issue 9.9 with a scope change; NVD’s primary score is 8.8.
Vulnerability Details
Root Cause
The custom component update handler accepts user-supplied Python source and turns it into a live component instance: prepare_global_scope() and build_class_constructor() in validate.py exec() the submitted module and class definition, and the server then calls update_build_config(build_config, field_value, field_name) on the resulting object. field_value is copied verbatim from the JSON request body with no sanitisation, and nothing constrains what the compiled class does when that callback fires — a subclass may override update_build_config() to treat the argument as an operating system command. Both the code that is compiled and the argument it receives are attacker-controlled, which is the “improper control of code generation” defect IBM describes (CWE-94).
Attack Vector
- Authenticate at
POST /api/v1/loginwith a valid Langflow username and password; the JSON response contains anaccess_token, sent asAuthorization: Bearer <token>. - Send
POST /api/v1/custom_component/updatewith a JSON body containingcode,field,field_value,templateandtool_mode. - The
codevalue defines aComponentsubclass that overridesupdate_build_config()to runsubprocess.run(field_value, shell=True, check=False). Thefield_valuevalue is the attacker’s shell command (for exampleidor a reverse-shell one-liner). - The server compiles the class and dispatches the callback with
field_value, so the command executes under the Langflow process account. Because the callback is configured withcheck=False, a failing command does not raise, and the endpoint returns HTTP 200 either way.
Impact
Remote code execution as the account running the Langflow server. In a typical Docker or pip deployment that process holds flow definitions, provider API keys, database credentials and knowledge-base data, and usually has outbound access to LLM providers. A low-privileged Langflow user can therefore run commands, read or alter stored flows and secrets, pivot to connected services, and persist through 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 for a vulnerable version.
| |
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' - Confirm the login token — keep the
access_tokenfrom the JSON response.Shell script1 2TOKEN=$(curl -s -X POST http://127.0.0.1:7860/api/v1/login \ -d 'username=user@example.com&password=passw0rd' | python3 -c 'import sys,json;print(json.load(sys.stdin)["access_token"])') - Run the archived PoC — supply the command to execute server-side (blind).Shell script
1 2python3 poc.py --url http://127.0.0.1:7860 --username user@example.com \ --password 'passw0rd' -c 'id > /tmp/rce_proof' - Verify execution — the HTTP response is only an accepted/200 signal, so check the target side effect.Shell script
1docker exec langflow cat /tmp/rce_proof # or any command/file you asked for
Exploit Code
See
poc.pyand the upstream notes inupstream-README.md.
| |
Expected Output
| |
Execution is blind: the PoC prints only the HTTP status, and the command’s stdout is not returned in the response. Success is confirmed by the command’s side effect on the target (the upstream screenshots show the command output inside the Langflow Docker container’s filesystem; they are GitHub attachment images and were not archived).
Detection & Indicators of Compromise
POST /api/v1/custom_component/updaterequests from non-admin, newly created or unusual accounts, especially with acodebody defining a class and afield_valuecontaining shell metacharacters (;,|,&&,$(), backticks).- Submitted component source that overrides
update_build_config, or that containssubprocess,os.system,popen,shell=True,__import__,eval,exec,socket, or base64 blobs. - Langflow process (
python/uvicorn) spawning shell children such as/bin/sh -c ...,id,whoami,curl,wget,bash -i, or reverse-shell binaries. - A login event (
/api/v1/login) immediately followed by custom component update traffic from the same account or source IP. - New files in
/tmp, the container working tree or the flow store, or outbound connections from the Langflow container to unexpected hosts. - Upstream screenshots show commands executed in the container; the README itself provides no detection content.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade Langflow OSS to 1.12.5 or later (IBM advisory), back up flows and configuration first, then restart the Langflow service so the new code is loaded. |
| Workaround | IBM recommends, in addition to upgrading, setting LANGFLOW_MCP_SERVER_INTERPRETER_HARDENING=true to reject direct shell-script execution and LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY=true to block non-admin MCP stdio access, then restarting the service; retain the default restriction on custom components in public workflows and do not set LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS. These controls reduce exposure but do not replace the upgrade. |
| Config Hardening | Run Langflow as a non-root, unprivileged user in an isolated container with no host mounts; restrict who can register or hold 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-107329 on 2026-11-25. Review verdict: real exploit code, ingested. The repository is a two-file PoC (poc.py plus a short screenshot-based README) that drives the live custom component update endpoint with a full login and a shell command — 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. The exploit was not executed during ingestion.
Limitations: a valid Langflow account is required, so this is post-auth only (CVSS PR:L, 9.9 with scope changed). Execution is blind — the response does not carry command output, so proof requires checking the target side effect (file, connection, process). The author tested Langflow 1.10.0; the NVD/IBM range 1.0.0–1.12.4 is used in this entry. The upstream README’s usage line (--url --username --password -c) matches the argparse options in poc.py, which call the login and update endpoints directly.
Code quirks: poc.py calls main() at import time (no if __name__ == "__main__" guard), so importing the module runs the CLI and argparse requires the arguments. The component is registered with display_name = "Probe", a decoy name. Upstream screenshots are hosted as GitHub user attachments and were not archived. A related Langflow bug, CVE-2026-107328 (authenticated code execution through the custom component class-definition endpoint), is a distinct CVE covered separately.
| |