Horizon Alert
Summary of the vulnerability and why it matters
This vulnerability in Langflow allows an unauthenticated attacker to execute arbitrary Python code on the server. This happens because a specific API endpoint, designed for building public workflows, incorrectly uses attacker-supplied code without proper checks. If you are using a vulnerable version, this could lead to a complete compromise of your system.
- Remote code execution is possible.
- Attackers do not need to authenticate.
- The flaw is in public workflow building.
Attack Path
How an attacker could exploit the issue
An attacker can exploit this by sending a crafted POST request to the `/api/v1/build_public_tmp/{flow_id}/flow` endpoint. This request would contain malicious Python code within the optional `data` parameter, which the vulnerable endpoint executes directly without any sanitization. This allows for unauthenticated remote code execution on the server.
- No authentication needed.
- Targets public flow build endpoint.
- Python code in `data` parameter.
Live Threat
Current exploitation, exposure, and threat context
This vulnerability presents a very clear pathway to unauthenticated remote code execution within Langflow. Attackers are likely to target this because it bypasses authentication and directly leverages code execution on the server. The vulnerability was discovered and publicly disclosed with exploit details, increasing its attractiveness.
- Exploited in the wild.
- Public exploit available.
- Recently discovered and disclosed.
Priority actions
Operational Fix
Recommended remediation, mitigation, and detection steps
Prioritize patching Langflow to version 1.9.0 or later immediately, as this vulnerability allows unauthenticated remote code execution and is actively exploited. If patching is not immediately feasible, isolate affected services from external access to prevent exploitation while developing a remediation plan.
- Upgrade Langflow to 1.9.0 or later.
- Isolate services from network access.
- Monitor for suspicious outbound connections.