NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Langflow

CVE-2026-7873: Langflow: Code Injection Vulnerability in Code Validation Endpoint

criticalCVSS 3.1 9.9GHSA-v798-mcc6-2m3m

Langflow's code validation endpoint executed the function definitions it was asked to validate. A logged-in user could put a malicious default argument or decorator in submitted code and run OS commands on the server. Langflow 1.0.0 through 1.10.0 is affected. Upgrade to 1.10.1, listed in the package data as 1.10.1.rc0.

Published Jun 30, 2026 · Updated Oct 23, 2026 · Analysis Oct 25, 2026

What an attacker can do

validate_code in src/lfx/src/lfx/custom/validate.py compiled each submitted function and then ran exec() on it. That executes decorators and default-argument expressions, so code runs during validation, even though the function is never called. A default argument that writes a file or starts a process is enough.

The attacker needs a Langflow account that can reach the endpoint. The fix pull request notes that with the default AUTO_LOGIN setup the flaw is effectively open to anyone who can reach the server. They get OS command execution as the Langflow process and can read sensitive files, including credentials. The CVSS scope is changed, since Langflow servers typically hold API keys for model providers and databases. IBM's bulletin describes this as enabling complete system compromise and lateral movement.

The patch makes validate_code compile only, and never exec() it. The create_function, execute_function and eval_function paths are unchanged and are gated by allow_custom_components. A reviewer noted that the import loop still calls importlib.import_module on top-level imports, deferred to a follow-up.

Who is affected

Affected: pip langflow from 1.0.0 up to but not including 1.10.1.rc0, per IBM Langflow OSS 1.0.0 through 1.10.0, on Windows, Linux and macOS.

pip show langflow

If you run the Docker image, check the image tag. Servers that are reachable from a network, or that use the default AUTO_LOGIN, have the highest exposure.

langflow

Ecosystem
PyPI
Affected
>= 1.0.0, < 1.10.1.rc0
Fixed in
1.10.1.rc0
Check
pip show langflow

How to fix it

Upgrade to Langflow 1.10.1. The package data lists the patched version as 1.10.1.rc0.

pip install --upgrade langflow

IBM lists no workarounds. Until you upgrade, restrict network access to the Langflow server and turn off AUTO_LOGIN so that only known users can reach the endpoint. After upgrading, rotate credentials stored on the host if you cannot rule out misuse.

How to tell if you were hit

Look in the Langflow access logs for requests to the code validation endpoint from accounts or addresses you do not expect, particularly with function definitions that contain default arguments calling os, subprocess or open. On the host, look for child processes of the Langflow process and for new files in temporary directories. Check outbound connections from the server. Beam records agent shell commands and file access, which helps if an AI agent drives the flow editor.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

IBM Langflow OSS 1.0.0 through 1.10.0 allows authenticated attackers to execute arbitrary OS commands and read sensitive files including credentials, enabling complete system compromise and lateral movement.

Questions

Is Langflow 1.10.0 affected by CVE-2026-7873?

Yes. IBM lists Langflow OSS 1.0.0 through 1.10.0 as affected. The fix is in 1.10.1.

Does the attacker need to be authenticated?

Yes, the CVSS vector requires low privileges. The fix pull request says that under the default AUTO_LOGIN setup it is effectively unauthenticated.

Is there a workaround?

IBM lists none. Limiting network access and disabling AUTO_LOGIN reduces exposure until you upgrade, but they are not a fix.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Langflow vulnerabilities

All Langflow entries