CVE-2026-51886: Langflow: code injection in validate/code enables RCE

GHSA-w584-2h2r-2hvfHIGHPoC AVAILABLECISA: ATTEND
Published October 1, 2026
CISO Take

Langflow 1.7.2 through 1.10.0 has a code injection flaw in the /api/v1/validate/code endpoint: any authenticated user can submit Python that the server executes without sandboxing, which gives full remote code execution on the host. The CVSS score is 8.8 and the EPSS percentile is only 68% (0.004). There is no public exploit, Nuclei template or KEV listing yet, but the practical risk is higher than those numbers suggest. Langflow has 192 other CVEs, and AIID #1578 (JADEPUFFER) reportedly shows an LLM-driven ransomware operator turning a vulnerable internet-facing Langflow deployment into a database-extortion operation. Upgrade to 1.10.1 now. Until then, remove internet exposure, restrict who can authenticate, and rotate any API keys or database credentials stored in flows.

Sources:NVDGitHub AdvisoryEPSSATLASAI Incident Database

What is the risk?

High. The attack is network-based, low complexity, needs only low privileges and no user interaction, and it compromises confidentiality, integrity and availability (CVSS 8.8). The EPSS of 0.00403 (68th percentile) and the lack of a public exploit, Nuclei template or KEV entry lower the short-term probability of exploitation. Several factors raise the real risk. The vulnerable code path is a simple, well-known pattern (compile/exec of user-supplied code). Langflow has a long history of similar flaws (192 CVEs in the package). The fix commit and PR are public, so a working exploit can be derived quickly. Self-registration or weak authentication in a Langflow deployment turns the 'authenticated' requirement into a weak barrier. Exposure is highest in deployments reachable from the internet or shared across many internal users.

How does the attack unfold?

Initial Access
The attacker obtains low-privilege credentials on an exposed Langflow instance through open sign-up, credential reuse or a shared account.
AML.T0012
Exploitation
The attacker sends a POST request with malicious Python to /api/v1/validate/code, and the server compiles and executes it without sandboxing.
AML.T0049
Code Execution
The injected code runs in the Langflow process and gives the attacker an interpreter or reverse shell on the host.
AML.T0050
Impact
The attacker steals LLM API keys and database credentials, pivots to connected data stores and can exfiltrate or extort.
AML.T0055

What systems are affected?

PackageEcosystemVulnerable RangePatched
Langflowpip>= 1.7.2, < 1.10.11.10.1
156.7KPushed 3d ago18% patched~76d to patchFull package profile →

Do you use Langflow? You're affected.

How severe is it?

CVSS 3.1
8.8 / 10
EPSS
0.6%
chance of exploitation in 30 days
Higher than 49% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
✓VulnCheck KEV (exploitation reported — broader/earlier than CISA) — Oct 2026
○CISA SSVC: Public PoC
○Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRLow
UINone
SUnchanged
CHigh
IHigh
AHigh

What should I do?

1 step
  1. 1) Upgrade langflow to 1.10.1 or later (fix in PR #13696 / commit e7c33dba). 2) If you cannot patch immediately, block or restrict access to /api/v1/validate/code at the reverse proxy or WAF, and remove public internet exposure. 3) Disable open sign-up and enforce strong authentication (SSO/MFA) with the minimum number of users. 4) Run Langflow as a non-root user in a hardened container with no sensitive host mounts, restricted egress and network segmentation from production databases. 5) Rotate every secret accessible to the Langflow process (LLM API keys, DB credentials, cloud tokens) if exposure is suspected. 6) Detect: look in access logs for POST requests to /api/v1/validate/code from unexpected accounts or IPs, and in endpoint telemetry for child processes, outbound connections or file writes originating from the Langflow Python process.

What does CISA's SSVC say?

DecisionAttend
Exploitationpoc
AutomatableYes
Technical Impacttotal

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Response to risks and unknown risks
OWASP LLM Top 10
LLM03-Supply ChainLLM06-Excessive Agency

Frequently Asked Questions

What is CVE-2026-51886?

Langflow 1.7.2 through 1.10.0 has a code injection flaw in the /api/v1/validate/code endpoint: any authenticated user can submit Python that the server executes without sandboxing, which gives full remote code execution on the host. The CVSS score is 8.8 and the EPSS percentile is only 68% (0.004). There is no public exploit, Nuclei template or KEV listing yet, but the practical risk is higher than those numbers suggest. Langflow has 192 other CVEs, and AIID #1578 (JADEPUFFER) reportedly shows an LLM-driven ransomware operator turning a vulnerable internet-facing Langflow deployment into a database-extortion operation. Upgrade to 1.10.1 now. Until then, remove internet exposure, restrict who can authenticate, and rotate any API keys or database credentials stored in flows.

Is CVE-2026-51886 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2026-51886, increasing the risk of exploitation.

How to fix CVE-2026-51886?

1) Upgrade langflow to 1.10.1 or later (fix in PR #13696 / commit e7c33dba). 2) If you cannot patch immediately, block or restrict access to /api/v1/validate/code at the reverse proxy or WAF, and remove public internet exposure. 3) Disable open sign-up and enforce strong authentication (SSO/MFA) with the minimum number of users. 4) Run Langflow as a non-root user in a hardened container with no sensitive host mounts, restricted egress and network segmentation from production databases. 5) Rotate every secret accessible to the Langflow process (LLM API keys, DB credentials, cloud tokens) if exposure is suspected. 6) Detect: look in access logs for POST requests to /api/v1/validate/code from unexpected accounts or IPs, and in endpoint telemetry for child processes, outbound connections or file writes originating from the Langflow Python process.

What systems are affected by CVE-2026-51886?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM workflow orchestration, RAG pipelines, low-code AI flow builders.

What is the CVSS score for CVE-2026-51886?

CVE-2026-51886 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.60%.

What is the AI security impact?

Affected AI Architectures

agent frameworksLLM workflow orchestrationRAG pipelineslow-code AI flow builders

MITRE ATLAS Techniques

AML.T0012Valid Accounts
AML.T0049Exploit Public-Facing Application
AML.T0050Command and Scripting Interpreter
AML.T0055Unsecured Credentials

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3
OWASP LLM Top 10: LLM03, LLM06

What are the technical details?

Original Advisory

langflow-ai langflow v1.9.3 is affected by: Code Injection. The impact is: execute arbitrary code (remote). The component is: src/backend/base/langflow/api/v1/validate.py:validate-post_validate_code-a-real-authenticated-http-post-to-api-v1. The attack vector is: Attack surface: HTTP or browser-backed service path. A public-facing route accepts raw Python source and forwards it into a server-side compile/exec validation path without any visible entitlement guard. ¶¶ A weakness has been identified in langflow-ai langflow up to 1.9.3. langflow contains a code injection vulnerability in validate-post_validate_code-a-real-authenticated-http-post-to-api-v1 (src/backend/base/langflow/api/v1/validate.py:13). An authenticated attacker can execute arbitrary Python code on the server by submitting malicious code to the /api/v1/validate/code endpoint, which directly executes user-supplied code without sandboxing or security controls.

Exploitation Scenario

An attacker obtains low-privilege access to a Langflow instance, for example through open registration, a leaked credential or a shared team account. They send a POST request to /api/v1/validate/code containing Python source whose top-level code or decorators run when the server compiles and executes it. The code launches a reverse shell or reads environment variables, which gives the attacker the LLM API keys and the connection strings of the databases the flows use. From there they move to the connected production database, exfiltrate the data and demand a ransom, as reportedly happened in the JADEPUFFER case with an LLM-driven agent.

Weaknesses (CWE)

CWE-94 — Improper Control of Generation of Code ('Code Injection'): The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

  • [Architecture and Design] Refactor your program so that you do not have to dynamically generate code.
  • [Architecture and Design] Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
October 1, 2026
Last Modified
October 5, 2026
First Seen
October 1, 2026

Related Vulnerabilities