CVE-2025-34291: Langflow Origin Validation Error Vulnerability
Langflow contains an origin validation error vulnerability in which an overly permissive CORS configuration 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. This could allow the attacker to execute arbitrary code and achieve full system compromise via obtained tokens that permit access to authenticated endpoints.
Other sources
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 (alloworigins='' with allowcredentials=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 accesstoken / refreshtoken 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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Langflowto a version that resolves this vulnerability.Fixed in 1.6.9 - Configuration
Correct the overly permissive CORS configuration that allows attacker-controlled origins by removing the wildcard origin usage (the issue is allow_origins='*' together with allow_credentials=True).
Langflow CORS configuration allow_origins = not '*' when allow_credentials=True - Configuration
Change the refresh token cookie setting so it is not configured as SameSite=None, since SameSite=None combined with the permissive CORS/credentials enables cross-origin credentialed refresh requests.
Langflow refresh token cookie SameSite = not None - Compensating control
Apply mitigations per vendor instructions or follow applicable BOD 22-01 guidance for cloud services.
- Compensating control
If mitigations are unavailable, discontinue use of the product.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-34291?
CVE-2025-34291 has a critical severity level due to its potential for account takeover and remote code execution.
How do I mitigate CVE-2025-34291?
To mitigate CVE-2025-34291, you should update Langflow to a version above 1.6.9 and review your CORS configuration to ensure it is not overly permissive.
What versions of Langflow are affected by CVE-2025-34291?
All versions of Langflow up to and including 1.6.9 are affected by CVE-2025-34291.
What types of attacks can CVE-2025-34291 facilitate?
CVE-2025-34291 can facilitate account takeover attacks and remote code execution exploits.
Can CVE-2025-34291 be exploited without authentication?
Yes, the overly permissive CORS configuration allows CVE-2025-34291 to be exploited without requiring authentication.