CVE-2026-12940 Command injection in Langflow OSS

Critical 9.8 Published Updated

Unauthenticated attackers can execute arbitrary code via environment variable injection in the MCP stdio launcher due to an incomplete blocklist.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-12940?

CVE-2026-12940 is a critical command injection vulnerability in Langflow Langflow, published on 30 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

IBM Langflow OSS 1.0.0 through 1.10.1  are vulnerable to unauthenticated remote code execution via environment variable injection in the MCP (Model Context Protocol) stdio launcher. The vulnerability exists in src/lfx/src/lfx/base/mcp/util.py where the DANGEROUS_ENV_VARS blocklist fails to include SHELLOPTS , BASHOPTS , and PS4 environment variables.

Weakness: CWE-78

Which versions are affected by CVE-2026-12940?

It affects 1 product.

Products include Langflow Langflow.

How do I fix CVE-2026-12940?

No fix has been published for CVE-2026-12940 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-12940 being exploited?

There is no known exploitation of CVE-2026-12940 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Langflow Langflow vulnerabilities

Sources

Also known as GHSA-gx45-8jc3-gqqr.

Is CVE-2026-12940 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free