Servers and applications
CVE-2026-51886
Title Authenticated Remote Code Execution in validate_code via Malicious Decorators Description
- Severity
- High 8.8
- Published
- 12 Aug 2026
- Last changed
- 8 Oct 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 1.10.1
- Exploit chance
- 0.6% in the next 30 daysHigher than 49% of CVEs. EPSS by FIRST, 19 Nov 2026
- Weakness
- Code injection (CWE-94)
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read data · Change data · Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Also known as
- GHSA-w584-2h2r-2hvf
- Sources
- Project advisories (GitHub)
Description
###Summary: 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.
The vulnerability is located in src/lfx/src/lfx/custom/validate.py(exposed via src/backend/base/langflow/api/v1/validate.py).
The validate_code function parses user input using ast. When it encounters a FunctionDef node, it compiles and executes it to check for extensive errors:
By design, executing a function definition (def func(): ...) does not execute the function body. However, Python immediately evaluates decorators attached to the function definition.
Affected software
| Software | Affected versions |
|---|---|
LangflowServers and applications · github:langflow-ai/langflow |
|
About Langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
- Weekly downloads (PyPI)
- 8,374PyPI Stats, 15 Nov 2026
- Docker Hub pulls
- 4,731,179Docker Hub, 15 Nov 2026
- GitHub stars
- 156,656GitHub, 15 Nov 2026
- Forks
- 10,412GitHub, 15 Nov 2026
- Latest release
- v1.13.2GitHub, 15 Nov 2026
- Released
- 10 Nov 2026GitHub
- License
- MITGitHub
- First published on GitHub
- 8 Feb 2023GitHub
Source code Website Docker image Package
Vulnerabilities in Langflow
- In our list
- 228
- Published in the last 12 months
- 221
- Critical, last 12 months
- 60
- High, last 12 months
- 101
- Known exploited
- 6
- CVE-2026-97677Langflow OSS is affected by multiple vulnerabilitiesHigh 8.1 8 Nov 2026
- GHSA-qvqp-mxh4-f27wLangflow URL component: unbounded response size allows denial of service via memory exhaustionMedium 6.5 5 Nov 2026
- CVE-2026-18894Langflow OSS is affected by multiple vulnerabilitiesCritical 9.8 29 Oct 2026
- CVE-2026-77817Langflow OSS is affected by multiple vulnerabilitiesMedium 6.5 29 Oct 2026
- CVE-2026-77819Langflow OSS is affected by multiple vulnerabilitiesMedium 6.5 29 Oct 2026
- CVE-2026-90991Langflow OSS is affected by multiple vulnerabilitiesMedium 6.5 29 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-51886
- GitHub Advisory Database https://github.com/advisories/GHSA-w584-2h2r-2hvf
- github.com https://github.com/langflow-ai/langflow/security/advisories/GHSA-w584-2h2r-2hvf