Any Langflow instance (≤1.6.9) exposed to the internet is a full system compromise waiting to happen — a single authenticated user visiting a malicious webpage hands the attacker RCE on your AI workflow server. Patch immediately or take Langflow offline; if patching is not possible, restrict it to VPN/internal network and enforce strict CORS policies. Given Langflow's built-in code execution and typical access to LLM API keys, vector stores, and downstream services, breach impact extends well beyond the Langflow host itself.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| langflow | pip | <= 1.6.9 | No patch |
| langflow | pip | — | No patch |
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade Langflow beyond 1.6.9 — review PRs #9240, #10139, #10696 on GitHub for confirmed fix. 2. NETWORK ISOLATION: If patch is unavailable, immediately restrict Langflow to VPN or internal network; remove all public internet exposure. 3. CORS HARDENING: Override CORS configuration to explicit allowed origins — never combine allow_origins='*' with allow_credentials=True. 4. COOKIE FLAGS: Set refresh token cookie to SameSite=Strict or SameSite=Lax to prevent cross-site inclusion. 5. DETECT: Monitor logs for refresh endpoint calls (e.g., /api/v1/refresh) with unexpected or missing Origin headers. 6. CREDENTIAL ROTATION: If exposure was possible, rotate all API keys and secrets accessible from the Langflow environment. 7. DISABLE EXECUTION: If built-in code execution is not operationally required, disable or firewall those endpoints at the reverse proxy level.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
Langflow versions up to and including 1.6.9 contain a chained vulnerability that enables account takeover and remote code execution. An overly permissive CORS configuration (allow_origins='*' with allow_credentials=True) combined with a refresh token cookie configured as SameSite=None allows a malicious webpage to perform cross-origin requests that include credentials and successfully call the refresh endpoint. An attacker-controlled origin can therefore obtain fresh access_token / refresh_token pairs for a victim session. Obtained tokens permit access to authenticated endpoints — including built-in code-execution functionality — allowing the attacker to execute arbitrary code and achieve full system compromise.
Exploitation Scenario
Attacker registers a domain and hosts a malicious webpage containing JavaScript that silently fetches the victim organization's Langflow refresh endpoint (e.g., https://langflow.company.com/api/v1/refresh). Because Langflow is misconfigured with allow_origins='*' plus allow_credentials=True, and the refresh cookie carries SameSite=None, the browser automatically includes the victim's cookie in the cross-origin request. The server responds with a fresh access_token/refresh_token pair. The attacker's script immediately uses the stolen access token to call Langflow's code execution endpoint, running a Python reverse shell. The attacker now has persistent RCE, extracts LLM API keys from environment variables, and pivots to connected AI infrastructure — all without the victim performing any action beyond loading the malicious page while authenticated to Langflow.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
- github.com/langflow-ai/langflow Product
- obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform Exploit Mitigation 3rd Party
- vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce 3rd Party
- github.com/advisories/GHSA-577h-p2hh-v4mv
- github.com/langflow-ai/langflow
- github.com/langflow-ai/langflow/pull/10139
- github.com/langflow-ai/langflow/pull/10696
- github.com/langflow-ai/langflow/pull/9240
- github.com/langflow-ai/langflow/pull/9441
- nvd.nist.gov/vuln/detail/CVE-2025-34291
- obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform
- vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce