Langflow Custom Component Remote Code Execution — CVE-2026-33017
by yayip · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-33017
- Category
- web
- Affected product
- Langflow (flow-building / LLM pipeline platform)
- Affected versions
- Not specified in source
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-07 |
| Author / Researcher | yayip |
| CVE / Advisory | CVE-2026-33017 |
| Category | web |
| Severity | Critical |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | langflow, rce, custom-component, code-execution, flow-builder, reverse-shell, curl |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Langflow (flow-building / LLM pipeline platform) |
| Versions Affected | Not specified in source |
| Language / Platform | Bash/curl PoC targeting Langflow’s REST API (Python backend) |
| Authentication Required | No (uses a client_id cookie value only, no real auth demonstrated) |
| Network Access Required | Yes |
Summary
Langflow exposes a REST API endpoint that builds and runs a “flow” — a graph of nodes describing a data/LLM pipeline. One of the supported node types is a generic custom component whose code field is arbitrary Python that Langflow imports and executes server-side to produce the component’s Component class. Because the API accepts this code from the client without restriction, an attacker can submit a flow containing a single malicious component whose code executes an OS command (in this PoC, a reverse shell) at load/definition time via os.system(), before the component is ever actually invoked as part of the flow logic. The PoC is a raw curl command posting a JSON flow definition to /api/v1/build_public_tmp/{flow_id}/flow with the malicious code embedded in the node’s code template field.
Vulnerability Details
Root Cause
The flow-build API executes attacker-supplied Python source code that is embedded in a custom component definition, with no sandboxing or restriction on what that code can do at import/class-definition time (e.g., calling os.system() before the component’s own logic ever runs).
Attack Vector
- Identify a reachable Langflow instance and a
build_public_tmp/flow-build API endpoint that accepts a flow definition. - Craft a JSON flow containing a single
genericNodewhose componentcodefield imports the required Langflow component base classes and includes a top-levelos.system(...)call (e.g., spawning a reverse shell) alongside the required component class definition. - POST the JSON payload to the flow-build endpoint.
- When Langflow parses/loads the component code to build the flow, the embedded OS command executes on the server.
Impact
Unauthenticated or low-privilege remote code execution on the host running Langflow, potentially leading to full server compromise.
Environment / Lab Setup
Target: Langflow instance with an internet/network-reachable flow-build REST API
Attacker: curl, a listener (e.g., `nc -lvnp 4444`) to catch the reverse shell
Proof of Concept
PoC Script
See
bashcmd.shin this folder. Note: the JSON payload in the upstream file is malformed/duplicated (thenodesarray and node object appear repeated three times, apparently a copy-paste artifact from the original author) — the overall approach (single maliciousgenericNodewith a code field executingos.system) is genuine and is the part to model a working payload on.
| |
Posts a crafted flow JSON containing a malicious custom component to the target Langflow API; if the flow-build step executes the embedded code, a reverse shell connects back to the attacker’s listener.
Detection & Indicators of Compromise
POST /api/v1/build_public_tmp/<uuid>/flow 200
Signs of compromise:
- Flow-build API calls whose component
codefield containsos.system,subprocess, or shell/network primitives - Unexpected outbound connections (e.g., to attacker IP/port) originating from the Langflow process
- New unrecognized child processes spawned by the Langflow backend service
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory |
| Interim mitigation | Restrict/authenticate access to flow-build and custom-component APIs, run Langflow in a sandboxed/least-privilege environment, and disable or tightly control arbitrary custom-component code execution |
References
Notes
Mirrored from https://github.com/yayip/CVE-2026-33017 on 2026-07-05.
| |