CVE-2026-7873: Langflow: Code Injection Vulnerability in Code Validation Endpoint
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 langflowIf 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 langflowIBM 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_LOGINsetup it is effectively unauthenticated.- Is there a workaround?
IBM lists none. Limiting network access and disabling
AUTO_LOGINreduces exposure until you upgrade, but they are not a fix.
References
Read for this analysis:
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 entriesCVE-2026-105697
Langflow: OS command injection (RCE) via arbitrary command in MCP stdio server configuration
critical9.9Oct 7, 2026CVE-2026-105698
Langflow : Cross-user flow access and vertex execution via deprecated /api/v1/build/{flow_id}/vertices endpoints
medium5.4Oct 7, 2026CVE-2026-105699
Langflow has Authenticated Cross-Project File Disclosure via Unscoped MCP Resource Handlers
high7.1Oct 7, 2026CVE-2026-105741
Langflow: IP Spoofing Bypass via `X-Forwarded-For` Allowing Remote Configuration Write
high7.1Oct 7, 2026CVE-2026-10561
Langflow: PythonREPLComponent executes unsandboxed Python code, enabling authenticated RCE and privilege escalation
critical9.9Oct 6, 2026GHSA-j8f7-x8jm-wmm4
Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling)
medium6.3Oct 6, 2026
