Langflow Origin Validation Error Vulnerability (CVE-2025-34291)
Langflow contains an origin validation error vulnerability (CVE-2025-34291) due to an overly permissive CORS configuration combined with a refresh token cookie configured as SameSite=None, allowing malicious webpages to perform cross-origin requests and potentially leading to arbitrary code execution and full system compromise.
CVE search metadata
CVE search record: CVE-2025-34291. Severity: high. CVSS: 8.8. EPSS: 31.20%. KEV: yes. Product: Langflow, Langflow < 1.3.5. Brief: Langflow Origin Validation Error Vulnerability (CVE-2025-34291). Brief link: https://feed.craftedsignal.io/briefs/2026-05-langflow-cors/
Triage facts
Revision 1- Applicability
- Langflow, Langflow < 1.3.5
- Evidence
- Confirmed activeHigh confidence
- Severity
- Critical
- Sources
- 6 public sources
- Freshness
- Revision 1May 21, 18:58 UTC
- Detection
- 2 rules
- Vulnerabilities
- 1 CVE
What's new
- 1. exploited:true; KEV CVE-2025-34291 Nov 19, 22:16 via cisa-kev
- 2. poc_available May 22, 21:01 via sploitus
Overview
Langflow is vulnerable to an origin validation error (CVE-2025-34291) stemming from a misconfiguration of Cross-Origin Resource Sharing (CORS). This, combined with the use of a refresh token cookie lacking proper SameSite restrictions (SameSite=None), allows attackers to bypass standard browser security mechanisms. A malicious actor can craft a webpage that, when visited by an authenticated Langflow user, can make unauthorized cross-origin requests to the Langflow server. This vulnerability allows an attacker to call the refresh endpoint and obtain tokens to access authenticated endpoints. The attacker can then leverage these tokens to perform actions as the compromised user, potentially leading to complete system compromise and data exfiltration. This vulnerability affects installations of Langflow prior to version 1.9.3.
Attack Chain
- Attacker identifies a Langflow instance with a vulnerable CORS configuration and SameSite=None refresh token cookie.
- Attacker crafts a malicious webpage designed to exploit the CORS misconfiguration.
- The attacker distributes the malicious webpage via phishing or other social engineering tactics.
- Victim, an authenticated Langflow user, visits the malicious webpage.
- The malicious webpage executes JavaScript code that initiates a cross-origin request to the Langflow server, including the refresh token cookie.
- Due to the permissive CORS policy and missing SameSite attribute, the Langflow server processes the request and returns a valid access token to the malicious webpage.
- The attacker uses the obtained access token to access authenticated endpoints on the Langflow server, performing actions as the compromised user.
- The attacker leverages the compromised access to execute arbitrary code and gain full system compromise, potentially exfiltrating sensitive data.
Impact
Successful exploitation of CVE-2025-34291 can lead to complete compromise of a Langflow installation. An attacker can gain unauthorized access to sensitive data, execute arbitrary code on the server, and potentially pivot to other systems within the network. The lack of proper origin validation makes Langflow instances highly susceptible to cross-site request forgery (CSRF) attacks, where authenticated users are tricked into performing actions without their knowledge or consent. This could affect any Langflow deployment, including cloud-based and on-premise installations.
Recommendation
- Apply the mitigations as documented in the vendor advisory (https://github.com/langflow-ai/langflow).
- Upgrade Langflow to version 1.9.3 or later, which addresses the CORS misconfiguration (https://github.com/langflow-ai/langflow/releases/tag/v1.9.3).
- Implement stricter CORS policies to restrict cross-origin requests to only trusted domains.
- Configure refresh token cookies with the
SameSite=StrictorSameSite=Laxattribute to prevent them from being sent with cross-origin requests. - Deploy the Sigma rule
Detect Langflow CVE-2025-34291 Exploitation Attempt via Malicious Refererto identify potential exploitation attempts based on the Referer header. - Apply applicable BOD 22-01 guidance for cloud services as recommended by CISA.
Detection coverage 2
Detect Langflow CVE-2025-34291 Exploitation Attempt via Malicious Referer
highDetects CVE-2025-34291 exploitation attempt by monitoring for HTTP requests to Langflow with a suspicious Referer header indicating a cross-origin request from a potentially malicious domain.
Detect Langflow CVE-2025-34291 Post-Exploitation Activity via Token Usage
criticalDetects CVE-2025-34291 post-exploitation activity by monitoring for API calls to authenticated endpoints after successful refresh token usage from a suspicious IP.
Detection queries are available on the platform. Get full rules →