CVE-2026-51886: langflow code injection in validate endpoint

CVE-2026-51886 · Severity: high · CVSS 8.8 · Published 2026-10-01

Langflow is a no-code framework for building LLM applications. An authenticated user can execute arbitrary Python code on the server by sending malicious code to the /api/v1/validate/code endpoint, which does not sanitize or sandbox the input. This allows an attacker to read files, steal secrets, compromise the system, and potentially move laterally within the network.

Technologies: Langflow-Ai Langflow, langflow (PyPI). Vendors: Langflow-Ai, PyPI.

Quick answers

Is CVE-2026-51886 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-51886 being exploited in the wild.
How severe is CVE-2026-51886?
High severity, with a CVSS score of 8.8, published 1 October 2026.
Which products and versions are affected?
Langflow-Ai Langflow up to 1.9.3; langflow (PyPI) >= 1.7.2, < 1.10.1, ECOSYSTEM:introduced=1.7.2,fixed=1.10.1.
Is there a fix for CVE-2026-51886?
Yes. langflow (PyPI): upgrade to 1.10.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-51886 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-51886?
Check whether you run Langflow-Ai Langflow or langflow (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • langflow (PyPI): upgrade to 1.10.1 or later
    pip install "langflow>=1.10.1"

Technical details

A code injection vulnerability exists in the /api/v1/validate/code endpoint (src/backend/base/langflow/api/v1/validate.py) where user-supplied Python code is directly passed to compile() and exec() functions without sandboxing or validation. An authenticated attacker can exploit this via HTTP POST to achieve remote code execution with the privileges of the backend process. No fix is documented in the available sources.

Affected products

  • langflow-ai langflow up to 1.9.3

Identifiers

  • CVE-2026-51886
  • GHSA-w584-2h2r-2hvf
  • PYSEC-2026-4236

Timeline

  • 2026-05-26: disclosed: Issue opened on GitHub
  • 2026-10-01: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.