CVE-2026-51886: Langflow: Title Authenticated Remote Code Execution in validate_code via Malicious Decorators Description
A critical Authenticated Remote Code Execution (RCE) vulnerability exists in the validate_code function of Langflow. The /api/v1/validate/code endpoint, meant to validate user-supplied code, leverages Python’s exec() function. While it attempts to restrict execution to function definitions, it fails to account for decorators, which are evaluated at definition time. This allows any authenticated user to execute arbitrary code on the server, resulting in a full system compromise.
References
- gist.github.com/Ro1ME/c11b1e63e4e8fca6b25275144f25ec2a
- github.com/advisories/GHSA-w584-2h2r-2hvf
- github.com/langflow-ai/langflow/commit/e7c33dbaade20b5295c7fa26bf83cc1ff68fba02
- github.com/langflow-ai/langflow/issues/13336
- github.com/langflow-ai/langflow/pull/13696
- github.com/langflow-ai/langflow/releases/tag/v1.10.1
- github.com/langflow-ai/langflow/security/advisories/GHSA-w584-2h2r-2hvf
- nvd.nist.gov/vuln/detail/CVE-2026-51886
Code Behaviors & Features
Detect and mitigate CVE-2026-51886 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →