NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Langflow

CVE-2024-37014: Langflow remote code execution vulnerability

highCVSS 3.1 8.8GHSA-qg33-x2c5-6p44

Langflow before 1.0.15 runs Python code sent to `POST /api/v1/custom_component`. Anyone who can reach that endpoint can execute operating system commands on the server. Upgrade to langflow 1.0.15 and keep Langflow off networks where untrusted users can reach it.

Published Jun 10, 2024 · Updated Jan 21, 2025 · Analysis Nov 1, 2026

What an attacker can do

Langflow's Custom Component feature lets a user write Python that becomes a node in a flow. When the user clicks "Check & Save", the UI posts the script to /api/v1/custom_component, and the server evaluates it. The code is not sandboxed, so a function in the script can call os or subprocess directly.

The reporter's proof of concept, in the project's issue 1973, put a function in a Custom Component that ran uname -a, base64-encoded the output and sent it to an external server in a GET request. The reporter says the same technique worked against the public Hugging Face Langflow playground and returned uname output and directory listings from the container. An attacker needs only network access to a Langflow instance that lets them use that endpoint. With the auto-login setting on, which the thread tells operators to disable for public hosting, no real login stands in the way. The result is code execution as the Langflow user, with its API keys, flow data and network reach.

Who is affected

Affected: langflow < 1.0.15. The advisory text describes the condition as untrusted users being able to reach POST /api/v1/custom_component. Instances on a public address or shared network are the exposed ones; single-user local installs bound to localhost are much less so.

pip show langflow

langflow

Ecosystem
PyPI
Affected
< 1.0.15
Fixed in
1.0.15
Check
pip show langflow

How to fix it

Upgrade to langflow 1.0.15.

pip install --upgrade "langflow>=1.0.15"

The issue thread, closed on Aug 2, 2024 with a link to issue 2908, proposes mitigations rather than one code patch: run Langflow in a container or sandbox, review and approve custom code, restrict imports such as subprocess and os, set resource limits, and block outbound calls from the server. It also advises disabling the AUTO LOGIN flag when hosting publicly. Treat these as hardening on top of the upgrade.

How to tell if you were hit

In web and proxy logs, find POST requests to /api/v1/custom_component from unfamiliar addresses. Review saved flows for Custom Component nodes whose code imports os, subprocess, socket or base64, or makes HTTP requests. On the host, look for shells or tools like uname spawned by the Langflow process, and outbound GET requests carrying long base64 query strings to unknown hosts.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Langflow allows remote code execution if untrusted users are able to reach the "POST /api/v1/custom_component" endpoint and provide a Python script.

Questions

Is CVE-2024-37014 exploited in the wild?

None of the sources say so, and it is not in CISA's KEV catalog. A public proof of concept exists in the project's issue tracker, and EPSS puts its exploitation probability high, so patch quickly.

Does it need authentication?

The CVSS vector requires low privileges. The issue thread warns that instances with the AUTO LOGIN flag on and a public address are an easy target.

Is input sanitization a fix?

The reporter rejected that idea. The core problem is running untrusted code on the server, so sandboxing and upgrading matter more than filtering.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Langflow vulnerabilities

All Langflow entries