CVE-2025-34291
BaseFortify
Publication date: 2025-12-05
Last updated on: 2025-12-08
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| langflow | langflow | 1.6.9 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-346 | The product does not properly verify that the source of data or communication is valid. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in Langflow versions up to 1.6.9 involves an overly permissive CORS configuration combined with a refresh token cookie set as SameSite=None. This setup allows a malicious webpage to perform cross-origin requests including credentials to the refresh endpoint, enabling an attacker to obtain fresh access and refresh tokens for a victim's session. With these tokens, the attacker can access authenticated endpoints, including code-execution functionality, leading to arbitrary code execution and full system compromise.
How can this vulnerability impact me? :
The vulnerability can lead to account takeover and remote code execution on the affected system. An attacker can gain unauthorized access to authenticated endpoints and execute arbitrary code, potentially resulting in full system compromise.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided resources do not explicitly discuss the impact of CVE-2025-34291 on compliance with common standards and regulations such as GDPR or HIPAA. However, given that the vulnerability allows full system compromise, including access to sensitive credentials, API keys, and tokens, it could potentially lead to unauthorized access to personal or sensitive data, thereby risking non-compliance with data protection regulations. Organizations using Langflow should consider this risk in their compliance assessments and apply recommended mitigations to reduce exposure. [1, 2]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection of this vulnerability involves identifying the presence of an overly permissive CORS configuration combined with a refresh token cookie set as SameSite=None. You can inspect the CORS headers and cookie settings on your Langflow instance. For example, use curl commands to check CORS headers and cookie attributes: 1. Check CORS headers: curl -I https://your-langflow-instance/api/v1/refresh 2. Inspect cookies and their attributes in browser developer tools or via curl with verbose output: curl -v --cookie-jar cookies.txt https://your-langflow-instance 3. Monitor network traffic for cross-origin requests including credentials to the /api/v1/refresh endpoint. Additionally, look for suspicious POST requests to /api/v1/validate/code that may indicate exploitation attempts. Since the vulnerability involves chained misconfigurations, automated scanning tools that detect insecure CORS policies and SameSite cookie settings can also help. However, no specific detection commands are provided in the resources. [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include: 1. Harden CORS policies by restricting allowed origins instead of using allow_origins='*' when allow_credentials=True. 2. Change the refresh token cookie setting from SameSite=None to SameSite=Lax or SameSite=Strict if frontend and backend are same-site. 3. Apply environment variables introduced in Langflow 1.6.0 to customize and restrict CORS settings. 4. Update Langflow to version 1.7 or later when available, as it plans to enforce stricter CORS defaults and safer cookie settings. 5. Implement proper CSRF protections on the refresh token endpoint or switch to using Authorization headers for token refresh to eliminate CSRF risks. 6. Monitor and restrict access to the /api/v1/validate/code endpoint and consider sandboxing code execution functionality once available. These steps reduce the attack surface and prevent token hijacking and remote code execution. [1]