CVE-2026-51886: any Langflow user can run code on the server through a decorator sent to /api/v1/validate/code (1.7.2 to 1.10.0, fixed 1.10.1)
Langflow's /api/v1/validate/code endpoint exec()'d each submitted function definition to check it. Python evaluates decorators (and default arguments) at definition time, so any authenticated user, or anyone when AUTO_LOGIN is on, could run arbitrary commands as the Langflow process by sending a function with a malicious decorator. Affected: 1.7.2 through 1.10.0 (earlier versions exposed the same sink without login). Fixed in 1.10.1, which only compiles the code.
What it is
validate_code() in src/lfx/src/lfx/custom/validate.py parsed the code with ast and, for each FunctionDef, compiled and exec()'d it with normal builtins available.
A payload like @lambda x: (__import__('os').system('...'), x)[1] above def f(): pass runs during validation, giving code execution with the server's privileges and access to its environment variables (API keys, database credentials).
Before v1.7.2 the endpoint had no authentication at all; from 1.7.2 to 1.10.0 it needed a session or API key. The duplicate report GHSA-xjq8-cqrm-7m4x used default-argument evaluation for the same result.
Fixed in 1.10.1 by PR #13696 (tracked as GHSA-2wcq-pvw2-xh7v): FunctionDef nodes are only compiled, never executed. Credited to ESPanda666, l3tchupkt and andifilhohub.
How to check
- Run pip show langflow (or check your image tag); versions below 1.10.1 are affected.
- Check whether AUTO_LOGIN is enabled and who has accounts or API keys on the instance.
How to fix
- Upgrade Langflow to 1.10.1 or later (current releases include many later fixes too).
- Turn off AUTO_LOGIN on any reachable instance and rotate secrets in the Langflow environment if untrusted users had access.
pip show langflow | grep -i ^version
docker exec <langflow-container> printenv LANGFLOW_AUTO_LOGIN Sources
- criticalCVE-2026-93680 and CVE-2026-110186: IBM fixes a 9.8 authentication bypass and unauthenticated code execution in Langflow up to 1.12.8, upgrade to 1.13.0
- criticalCVE-2026-104339 and 30 more: IBM's Langflow 1.12.4 and 1.12.5 bulletins fix unauthenticated RCE, three 9.9 code execution bugs, SSRF and path traversal
- criticalCVE-2026-104334 and CVE-2026-93674: IBM's Langflow OSS bulletin lists two unauthenticated code execution flaws plus a batch of sandbox, file access and credential issues, fixed in 1.12.3
- criticalCVE-2026-10561: Langflow's Python Interpreter component ran code with no real sandbox