Remote Code Execution in Langflow CSV Agent via python_repl_ast Exposure
CVE-2026-27966 is a critical remote code execution vulnerability in Langflow affecting versions prior to 1.8.0. The flaw is in the CSV Agent node, which hardcodes allow_dangerous_code=True. This automatically exposes LangChain’s Python REPL tool, python_repl_ast, to agent execution paths. Because the dangerous-code setting is enabled by default and described as not disableable through the Langflow UI, an attacker can use prompt injection through the Langflow chat interface to cause the agent to execute arbitrary Python code and underlying OS commands on the server. The issue effectively turns prompt input into a path to server-side code execution in deployments where the CSV Agent is reachable.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
Repository contains a single Python exploit tool (langflow.py) plus a README. The tool is an all-in-one network exploit targeting alleged Langflow RCE (CVE-2026-27966). It supports single-target and mass scanning (threaded), automatic detection of Langflow instances, optional automatic flow creation (to obtain a flow_id when missing), and then remote command execution against the target via Langflow’s HTTP API. Post-exploitation capability is an interactive command loop (“interactive shell”) that repeatedly sends attacker-supplied OS commands and prints cleaned output. Key capabilities implemented in code: - HTTP client with User-Agent rotation and optional proxy support (proxy list loaded from a local file). - Multi-threaded scanning of many targets from an input file; tracks counts of scanned/langflow/vulnerable and stores exploited results. - Exploitation workflow: detect instance → obtain/create flow_id → send crafted request to execute a command → parse/clean response output. - Operator features: debug logging, save vulnerable URLs to an output file, run a single command or interactive shell. Notable endpoints/targets: - The exploit primarily targets user-supplied base URLs (e.g., http(s)://<host>:7860). The README provides example targets and file names (targets.txt). The code also references local file paths for proxy lists and output results. (The specific Langflow API paths used for detection/flow creation/command execution are not visible in the provided truncated snippet, but the structure clearly indicates multiple endpoint checks and a flow-based RCE trigger.)
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
20 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
Critical remote code execution (RCE) in Langflow’s CSV Agent node caused by hardcoded enabling of dangerous code execution (allow_dangerous_code=True), which exposes LangChain’s python_repl_ast tool to attacker-controlled prompts, enabling OS command execution via prompt injection through the chat interface.
A remote code execution vulnerability in Langflow where the CSV Agent node hardcodes dangerous code execution enabled, exposing LangChain's Python REPL tool and allowing prompt-injection-driven arbitrary Python/OS command execution on the server.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.