CVE-2025-34291: Langflow Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-577h-p2hh-v4mv
CVSS 8.8
CWE-346
Published
Advisory Summary

CVE-2025-34291 is a CRITICAL (CVSS 8.8) remote code execution vulnerability (CWE-346: Origin Validation Error) affecting Langflow libraries in the PyPI ecosystem. The issue involves langflow cors misconfiguration enables account takeover and rce. Remediation is available by upgrading affected packages to version 1.7.0.

CVE-2025-34291 at a Glance

CVE Identifier CVE-2025-34291
GHSA Identifier GHSA-577h-p2hh-v4mv
Severity CRITICAL
CVSS v3.1 Base Score 8.8
CWE Classification CWE-346: Origin Validation Error
Affected Product Langflow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-34291

To remediate this vulnerability, upgrade all affected Langflow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langflow fixed: 1.7.0
pip install langflow>=1.7.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langflow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-34291, inspect your installed packages using pip:

pip show langflow

Analyze the terminal output to locate any version of Langflow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.0), your application is affected.

Note: The pip show langflow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Langflow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-34291 Affected Langflow Versions

1 component(s)
Fixed Versions:
1.7.0
Product / Package Ecosystem Affected Versions Fixed Version
langflow
PyPI
< 1.7.0
1.7.0

References

Frequently Asked Questions

What is CVE-2025-34291?
CVE-2025-34291 is a security vulnerability in Langflow involving Langflow CORS misconfiguration enables Account Takeover and RCE under CWE-346: Origin Validation Error.
Which Langflow versions are affected?
Affected versions include releases prior to 1.7.0 across affected packages: langflow.
What version fixes CVE-2025-34291?
Upgrading to 1.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langflow affected?
Yes, langflow is affected in releases prior to 1.7.0. Upgrade your dependency to 1.7.0 or later.
What is the CVSS score of CVE-2025-34291?
CVE-2025-34291 has a CVSS v3.1 base score of 8.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-34291?
CVE-2025-34291 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check PyPI dependencies for CVE-2025-34291?
Run the dependency tree command: 'pip show langflow'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-577h-p2hh-v4mv",
  "modified" : "2026-05-29T20:50:38Z",
  "published" : "2025-12-06T00:31:36Z",
  "aliases" : [ "CVE-2025-34291" ],
  "summary" : "Langflow CORS misconfiguration enables Account Takeover and RCE",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.6.9"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-34291"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/pull/10139"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/pull/10696"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/pull/9240"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/pull/9441"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langflow-ai/langflow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/langflow/PYSEC-2025-78.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291"
  }, {
    "type" : "WEB",
    "url" : "https://www.crowdsec.net/vulntracking-report/cve-2025-34291"
  }, {
    "type" : "WEB",
    "url" : "https://www.obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-21T21:30:47Z",
    "nvd_published_at" : "2025-12-05T23:15:47Z"
  }
}