Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27966: CWE-94: Improper Control of Generation of Code ('Code Injection') in langflow-ai langflow

0
Critical
VulnerabilityCVE-2026-27966cvecve-2026-27966cwe-94
Published: Thu Feb 26 2026 (02/26/2026, 01:55:18 UTC)
Source: CVE Database V5
Vendor/Project: langflow-ai
Product: langflow

Description

CVE-2026-27966 is a critical remote code execution vulnerability in langflow versions prior to 1. 8. 0. The flaw arises because the CSV Agent node hardcodes allow_dangerous_code=True, exposing LangChain’s Python REPL tool. This allows attackers to execute arbitrary Python and OS commands via prompt injection without authentication or user interaction. The vulnerability has a CVSS score of 9. 8, indicating high impact on confidentiality, integrity, and availability. Although no known exploits are currently in the wild, unpatched systems remain at significant risk. Version 1. 8.

AI-Powered Analysis

AILast updated: 02/26/2026, 02:26:01 UTC

Technical Analysis

CVE-2026-27966 is a critical vulnerability classified under CWE-94 (Improper Control of Generation of Code) affecting langflow, a tool used to build and deploy AI-powered agents and workflows. Prior to version 1.8.0, the CSV Agent node in langflow hardcodes the parameter allow_dangerous_code=True. This setting exposes LangChain’s Python REPL tool (python_repl_ast), which is designed to evaluate Python code dynamically. Because this REPL is exposed without restrictions, an attacker can leverage prompt injection techniques to execute arbitrary Python code and underlying operating system commands on the server hosting langflow. The vulnerability requires no authentication or user interaction, making it remotely exploitable over the network. The impact includes full remote code execution (RCE), allowing attackers to compromise confidentiality, integrity, and availability of the affected system. The vulnerability was publicly disclosed on February 26, 2026, with a CVSS v3.1 base score of 9.8, reflecting its critical severity. Although no known exploits have been observed in the wild yet, the ease of exploitation and the critical nature of the flaw necessitate immediate remediation. The issue is fixed in langflow version 1.8.0 by removing the hardcoded dangerous code execution flag, thereby preventing exposure of the Python REPL tool.

Potential Impact

The vulnerability enables attackers to execute arbitrary code remotely on servers running vulnerable versions of langflow, potentially leading to complete system compromise. This can result in unauthorized data access, data manipulation, destruction of data, and disruption of AI workflows. Organizations relying on langflow for AI agent deployment may face operational downtime, loss of intellectual property, and exposure of sensitive information. The critical severity and lack of authentication requirements increase the risk of automated attacks and widespread exploitation. Additionally, compromised systems could be used as pivot points for lateral movement within networks, further escalating the impact. The vulnerability threatens organizations across industries adopting AI automation and workflow orchestration, especially those integrating langflow into production environments.

Mitigation Recommendations

Immediate upgrade to langflow version 1.8.0 or later is the primary mitigation step to remove the hardcoded allow_dangerous_code=True setting. Until upgrade is possible, organizations should restrict network access to langflow instances, especially limiting exposure to untrusted networks. Implement strict input validation and sanitization on any user-supplied data that interacts with langflow workflows. Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with custom rules to detect and block suspicious prompt injection patterns targeting the Python REPL. Monitor logs for unusual command execution or unexpected Python code activity. Conduct regular security audits of AI workflow tools and maintain an inventory of versions deployed. Consider isolating langflow environments using containerization or sandboxing to limit potential damage from exploitation.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-25T03:24:57.793Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699fabd8b7ef31ef0b7dea23

Added to database: 2/26/2026, 2:11:36 AM

Last enriched: 2/26/2026, 2:26:01 AM

Last updated: 2/26/2026, 4:18:06 AM

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats