All vulnerabilities

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.

From langflow-ai/langflow's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
LangflowServers and applications · github:langflow-ai/langflow
  • From 1.7.2 before 1.10.1

About Langflow

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

From its GitHub repository.
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

References