# Langflow code injection in validate_code endpoint

Source: https://junglewise.ai/threats/duplicate-advisory-title-authenticated-remote-code-execution-in-65a053a9  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-02. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

Severity: high · Published 2026-10-02

Langflow, an open-source framework for building LLM applications, contains a code injection vulnerability in its code validation endpoint that allows authenticated users to execute arbitrary Python code on the server. An attacker with valid credentials can exploit the /api/v1/validate/code API endpoint to run malicious code without restriction, potentially leading to full system compromise and data exfiltration.

Technologies: [Langflow-Ai Langflow](https://junglewise.ai/threats/technologies/langflow-ai-langflow), [langflow (PyPI)](https://junglewise.ai/threats/technologies/pypi-langflow). Vendors: [Langflow-Ai](https://junglewise.ai/threats/vendors/langflow-ai), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, published 2 October 2026.

**Which products and versions are affected?** Langflow-Ai Langflow >=1.7.2, <1.10.1; langflow (PyPI) >= 1.7.2, < 1.10.1.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** 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.

## Technical details

The vulnerability is a code injection flaw in the validate_code endpoint (src/backend/base/langflow/api/v1/validate.py) where user-supplied Python source code is directly compiled and executed server-side without sandboxing or security controls. The attack requires authentication and network access to the API endpoint. An authenticated attacker can execute arbitrary Python code with server privileges.

## Affected products

- langflow-ai langflow >=1.7.2, <1.10.1

## Timeline

- 2026-10-02: disclosed
- 2026-10-05: advisory: Advisory withdrawn as duplicate of GHSA-w584-2h2r-2hvf

## Related threats

- [Langflow SSRF in URL-taking components](https://junglewise.ai/threats/langflow-ssrf-in-url-taking-components-protection-disabled-by-default-db7cac37)
- [Langflow IP spoofing in MCP configuration installation](https://junglewise.ai/threats/cve-2026-105741-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow command injection in MCP server configuration](https://junglewise.ai/threats/cve-2026-105740-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow path traversal and cross-user disclosure in MCP resources](https://junglewise.ai/threats/cve-2026-105699-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
- [Langflow authorization bypass in flow API endpoints](https://junglewise.ai/threats/cve-2026-105698-langflow-is-a-tool-for-building-and-deploying-ai-powered-agents)
