CVE-2025-34291: Langflow Origin Validation Error Vulnerability
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.
How it works
The weakness is classified as CWE-346, an origin validation error. In this class an application fails to enforce that incoming requests originate from an expected source.
- An attacker places code on a site the victim visits.
- The code issues a cross-origin request to the Langflow refresh endpoint while including the SameSite=None cookie.
- Because CORS permits the request, the server issues fresh tokens that the attacker can then replay against other endpoints.
Exploit mechanics beyond this description are not provided in the available summary and must be confirmed against the vendor advisory.
Am I affected? How to find it in your systems
Langflow instances are typically deployed in development or internal environments that expose web interfaces. Begin by inventorying all hosts running the software through package managers, container registries, or orchestration platforms.
- Examine application configuration files and deployment manifests for CORS allow-origin settings and cookie attributes on refresh tokens.
- Look for SameSite=None combined with overly broad origin lists such as wildcards.
- Review authentication logs for refresh endpoint calls that originate from unexpected referrers or lack expected session context.
- Confirm exact affected versions and configurations against the vendor advisory, as public detail on version ranges is limited.
How to remediate
Apply the vendor-supplied update or configuration change referenced in the official advisory. After patching, review and tighten CORS policies to list only required origins and change the refresh token cookie to SameSite=Lax or Strict where functional requirements allow.
- Disable or restrict the refresh endpoint if it is not required for normal operation.
- Ensure all authentication cookies carry the Secure flag and are scoped to the minimal necessary domain.
- Follow applicable CISA BOD 22-01 guidance for any cloud-hosted instances.
If you can't patch immediately
Until a fix can be applied, place Langflow instances behind network controls that limit inbound traffic to trusted sources only. Segment the systems so that compromise cannot easily reach production data stores or other services.
- Monitor authentication and refresh endpoints for anomalous volume or origin patterns.
- Consider virtual patching through a web application firewall that inspects and blocks cross-origin requests carrying the refresh cookie from unapproved referrers.
- If mitigations cannot be implemented, discontinue use of the affected deployment as directed by CISA guidance.
If your data may have been exposed
Actively exploited vulnerabilities of this type have led to unauthorized access and subsequent data exposure in other incidents. Organizations can run a free exposure scan of their domains and associated email addresses against known breach data to determine whether any credentials or tokens have already appeared in public records.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XReferences
- github.com/langflow-ai/langflow
- www.obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-v
- www.vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291
- www.crowdsec.net/vulntracking-report/cve-2025-34291