Langflow OSS <=1.12.2 - Unauthenticated RCE via Import Code Execution
Langflow OSS 1.0.0 through 1.12.2 is vulnerable to unauthenticated remote code execution via the POST /api/v1/validate/code endpoint, which calls importlib.import_module() on user-supplied import statements, executing module top-level code instead of merely validating syntax. Combined with the default LANGFLOW_AUTO_LOGIN=true configuration (which issues a superuser JWT from GET /api/v1/auto_login with no credentials) and the custom_component exec() sink (POST /api/v1/custom_component, which can plant arbitrary Python modules into site-packages), a remote unauthenticated attacker achieves arbitrary OS command execution. Fixed in 1.12.3 by replacing importlib.import_module() with importlib.util.find_spec() (commit 461506ac2f). References: https://www.pruva.dev/reproductions/REPRO-2026-00381 https://github.com/langflow-ai/langflow https://github.com/langflow-ai/langflow/commit/461506ac2f38f70a994b5140572b876448c11e4c Remediation: Upgrade to Langflow OSS 1.12.3 or later. As a temporary mitigation, set LANGFLOW_AUTO_LOGIN=false with strong superuser credentials and restrict network access to the Langflow instance.
10 assets checked · domain, subdomain, ipv4