(0Day) Langflow code Code Injection Remote Code Execution Vulnerability
The validate endpoint in Langflow fails to properly validate a user-supplied code parameter before executing it as Python code. An unauthenticated remote attacker can exploit this to execute arbitrary code with root privileges.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Authentication is not required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the validate endpoint passes the user-supplied code parameter directly to a Python execution function without any validation or sandboxing.
Impact
An unauthenticated attacker could execute arbitrary code with root privileges on the affected Langflow installation.
What the attacker needed
Network access to the Langflow instance; no authentication required
The fix
The vendor has not released a fix; the only mitigation is to restrict interaction with the product.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Langflow is a tool for building AI workflows. It has a feature that runs Python code sent by the user, but it does not check that the code is safe. This means anyone on the internet can send malicious code and take control of the server, even without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.