(0Day) Langflow PythonFunction Code Injection Remote Code Execution Vulnerability
Langflow's handling of Python function components lets an attacker introduce custom Python code into a workflow. Depending on configuration, this allows code execution in the context of the application.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Attack vectors and exploitability will vary depending on the configuration of the product.
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 Python function component accepts and executes user-supplied code without adequate restriction or sandboxing.
Impact
An attacker could execute arbitrary code in the context of the application, though exploitability varies with product configuration.
What the attacker needed
Ability to add code to a workflow; depends on product configuration
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 workflows that can include small pieces of Python code. If the application does not properly restrict who can add such code, someone can slip in their own code and make the server run it, which is effectively taking control of that program.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.