Three Missing Variables, One Unauthenticated RCE

September 21, 2026 · SPR{K3 Research

CVE-2026-12940 turns Langflow's MCP stdio launcher into a Bash shell for anyone on the network

On July 30, a new critical vulnerability landed against IBM Langflow OSS: CVE-2026-12940, CVSS 9.8, unauthenticated remote code execution, affecting Langflow OSS 1.0.0 through 1.10.1. It is the second named-CVE hit on an MCP-native agent platform in as many days — RufRoot / CVE-2026-59726 landed against Ruflo on July 29 — and it is the fourth unauthenticated-RCE class filed against Langflow alone in about a month.

The bug in one paragraph

Langflow ships an MCP stdio launcher — the piece that spawns an MCP tool as a child process and hands it an environment. To stop attackers from injecting hostile shell state into that child, Langflow keeps a deny-list called DANGEROUS_ENV_VARS inside src/lfx/src/lfx/base/mcp/util.py. Per TheHackerWire's writeup of the disclosure, the deny-list forgot three: SHELLOPTS, BASHOPTS, and PS4. Any Bash process reads all three during startup and gives them shell semantics. Send Langflow one of those variables in a request that reaches the stdio launcher, and Bash executes whatever you put in it — no login, no click, no user in the loop.

Why the deny-list is the bug

Deny-lists are attempts to enumerate everything the shell will interpret. The shell keeps winning that enumeration game. PS4 is a debug-prompt string that Bash expands with arithmetic and command substitution the moment shell tracing is on. SHELLOPTS and BASHOPTS control what tracing modes are on. The three together are the classic "turn on xtrace, then set the trace prompt to run a command" pattern that has been an exploit primitive against sh-family shells for years. The same shape shows up whenever a project tries to sandbox a subprocess by filtering its environment character-by-character instead of running it under a fresh, minimal environment. Obsidian Security called this out for the MCP-stdio class specifically in their writeup of Flowise CVE-2026-40933 earlier in the year: the stdio launcher is the boundary that matters, and any deny-list on the environment is a promise the launcher can't keep.

Where this sits in the pattern

Langflow is a widely-used framework for wiring AI-agent workflows with MCP tools. This is the fourth unauthenticated-RCE-class CVE against it in about a month:

Different endpoints, different layers, one shape: the framework accepts something an attacker can shape into code that ends up on a shell. Each fix has closed one specific instance and left the pattern intact.

Why it lands in the same week as RufRoot

Ruflo's RufRoot disclosure on July 29 was the other half of this week's picture: an MCP bridge that shipped with no authentication and 233 tools reachable at POST /mcp by default. CVSS 10.0. Fixed in 24 hours after a coordinated report. That failure was at the authentication layer — the front door of the bridge was open. CVE-2026-12940 is one layer deeper. Langflow had the filter. It just enumerated the wrong things.

Both are the same market-structure story from different angles: the MCP-native agent-platform tier is now shipping unauthenticated-RCE CVEs at community-scale and IBM-brand scale in the same week. CSA's Lab Space has been tracking Langflow specifically for active exploitation since spring. The MCP tier is where the failure density is right now.

What to do about it if you run Langflow OSS

TheHackerWire's advisory notes no public PoC yet and no patched version listed as of Jul 30. If you run 1.0.0–1.10.1, treat it as an emergency:

The takeaway

The AI-agent framework tier has crossed the deployment threshold where "the vendor added a deny-list" is not a workable trust boundary for the MCP tool-launch surface. Three missing environment variables in one filter are enough to hand the whole service to anyone on the network. Ruflo shipped without authentication; Langflow shipped with a filter that let three Bash-native variables through. The lesson is the same one Google's GKE AI security blueprint puts on the whole stack: controls in the inference path, not around it. For an MCP stdio launcher that means the boundary the syscall crosses, not the string the launcher inspects.

Watch what the child process does. That is the boundary that stayed open here.


SPR{K3 is a security research operation that pairs offensive vulnerability research with runtime behavioral defense. Defend is our runtime agent. To talk about a deployment, reach us at support@sprk3.com.