Langflow validate_code endpoint allows authenticated remote code execution (CVE-2026-51886)
Summary
The /api/v1/validate/code endpoint in Langflow executes submitted function definitions, and Python evaluates decorators when a function is defined. Any authenticated user could therefore run arbitrary code on the server. The vulnerable range is at least 1.7.2 and before 1.10.1, and the fix is in 1.10.1. The GitHub advisory lists severity as high with CVSS 8.8, while its summary text calls the flaw critical.
Severity
Timeline
A public issue titled Code Injection in the /api/v1/validate/code endpoint was opened in the Langflow repository.
GitHub advisory GHSA-w584-2h2r-2hvf for CVE-2026-51886 was published.
How it happened
validate_code() parses submitted code and executes function definitions with exec(). Decorators are evaluated at definition time, so a malicious decorator runs during validation. The advisory says the endpoint had no authentication before v1.7.2. From v1.7.2 through v1.10.0 it required a valid session, or no login at all under AUTO_LOGIN. Code runs with the privileges of the Langflow process.
How to check your app
- langflow >= 1.7.2, < 1.10.1: Check the installed langflow version. Versions in this range are listed as vulnerable.
- Versions before 1.7.2: The advisory says the same exec() sink was reachable without authentication in these releases. Treat them as exposed and upgrade.
- 1.7.2 to 1.10.0 with AUTO_LOGIN enabled: Check whether AUTO_LOGIN is in use. The advisory says any user could trigger the flaw under this setting.
- All affected versions: The advisory says the process can read environment variables such as API keys and DB credentials. Consider whether any were reachable from the Langflow process.
Sources
Corrections and updates
Cite this entry
- Title
- Langflow validate_code endpoint allows authenticated remote code execution (CVE-2026-51886)
- Added
- Nov 20, 2026
- URL
- https://vibeincidents.com/incidents/langflow-cve-2026-51886/
- Suggested citation
VibeIncidents. "Langflow validate_code endpoint allows authenticated remote code execution (CVE-2026-51886)." Nov 20, 2026. https://vibeincidents.com/incidents/langflow-cve-2026-51886/