Remote Code Execution in Langflow Python Code Validation
CVE-2026-51886 is a code injection vulnerability in Langflow's Python code-validation functionality. The validate_code() function executes submitted function definitions during validation, allowing malicious decorators and default-argument expressions to execute arbitrary Python code without sandboxing. Initial descriptions identify versions through 1.9.3; the fixing advisory identifies the vulnerable execution path through version 1.10.0. Exploitation requires authentication in versions 1.7.2 through 1.10.0 unless AUTO_LOGIN is enabled; earlier versions expose the same execution sink without authentication. Successful exploitation executes code with the privileges of the Langflow process. Version 1.10.1 fixes the vulnerability.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Arbitrary server-side code execution can compromise the confidentiality, integrity, and availability of resources accessible to the Langflow process. Attackers can read environment variables, API keys, database credentials, and application data; modify files; execute commands; and attack reachable internal services. The extent of compromise depends on process privileges, container isolation, network access, and available credentials.
If you can’t patch tonight, do this now.
Until the upgrade is deployed, disable or block access to /api/v1/validate/code and restrict Langflow to trusted users and private networks or a VPN. Authentication alone is insufficient because authenticated users can exploit the vulnerable validation path. Run Langflow with minimal privileges and strong isolation, avoid mounting container-management sockets, restrict outbound access and cloud metadata access, and minimize attached cloud identity permissions. Where compromise is suspected, rotate potentially exposed provider and application credentials before rotating the Langflow secret key, and review application and cloud activity.
Patch, then assume compromise.
Upgrade Langflow and its related packages to version 1.10.1 or later. The fix replaces execution of submitted function definitions with compilation-only validation, preventing decorators and default-argument expressions from being evaluated. Withdrawal of the duplicate advisory does not mean the vulnerability was resolved.
No public exploits tracked yet. Mallory keeps watching.
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.