Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

1154+ Articles
126+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2025-34291: Langflow Origin Validation Error Vulnerability
CVE-2025-34291: Langflow Origin Validation Error Vulnerability
SECURITYHIGHCVE-2025-34291

CVE-2025-34291: Langflow Origin Validation Error Vulnerability

CISA adds CVE-2025-34291 to the Known Exploited Vulnerabilities catalog — an overly permissive CORS configuration combined with a SameSite=None refresh...

Dylan H.

Security Team

May 22, 2026
5 min read

Affected Products

  • Langflow (affected versions per vendor advisory)

Executive Summary

CVE-2025-34291 is an origin validation error vulnerability in Langflow, the popular open-source AI workflow automation platform. The flaw stems from an overly permissive CORS (Cross-Origin Resource Sharing) configuration combined with a refresh token cookie configured as SameSite=None, allowing a malicious webpage to perform cross-origin requests that include user credentials and successfully call the refresh endpoint.

CISA added this vulnerability to its Known Exploited Vulnerabilities (KEV) catalog on May 21, 2026, confirming active exploitation in the wild. Organizations running Langflow for AI workflow orchestration — particularly those with publicly accessible instances — face elevated risk of session hijacking.


Vulnerability Details

AttributeValue
CVE IDCVE-2025-34291
SeverityHigh
CWECWE-346 — Origin Validation Error
VendorLangflow
ProductLangflow
CISA KEV AddedMay 21, 2026
Exploitation StatusActively exploited in the wild

Technical Analysis

Root Cause

Langflow's authentication system issues refresh tokens stored as browser cookies with the SameSite=None attribute. This attribute is intended for cross-site cookie sharing (e.g., embedded content), but when combined with Langflow's overly permissive CORS policy, it creates an attack pathway:

  1. SameSite=None — the refresh token cookie is sent with cross-origin requests
  2. Permissive CORS — Langflow's CORS configuration does not adequately restrict which origins can make credentialed requests
  3. Refresh endpoint exposure — an attacker-controlled page can trigger a cross-origin request to Langflow's /refresh endpoint, and the browser will automatically include the victim's refresh token cookie

The attacker receives a valid new access token from Langflow's server, effectively taking over the authenticated session without ever directly stealing the cookie value.

Attack Scenario

1. Victim is authenticated to a Langflow instance and visits a malicious webpage
2. Malicious page sends a cross-origin fetch() to https://victim-langflow.example.com/refresh
3. Browser automatically attaches the SameSite=None refresh token cookie
4. Langflow's permissive CORS policy allows the request and returns a new access token
5. Attacker receives the access token and gains full access to the victim's Langflow session
6. Attacker can read/modify AI workflows, extract API credentials stored in Langflow, and pivot

Why Langflow Is High-Value

Langflow is widely used to build and orchestrate AI agents and pipelines. A compromised Langflow session exposes:

  • AI workflow definitions — proprietary logic, prompt engineering, and automation flows
  • Stored API credentials — keys for OpenAI, Anthropic, vector databases, and other integrated services
  • Connected data sources — Langflow pipelines frequently process sensitive documents and structured data
  • Model configurations — fine-tuning parameters and system prompts

Impact Assessment

AreaRisk
Session HijackingFull authenticated access to the victim's Langflow instance
Credential TheftAPI keys stored in Langflow workflows are accessible to the attacker
Data ExfiltrationWorkflow inputs, outputs, and processed documents exposed
Workflow TamperingAttacker can modify or sabotage AI pipelines
Lateral MovementCompromised API keys enable attacks on downstream services

Remediation

Immediate Actions

  1. Apply the vendor patch — update Langflow to the version that addresses CVE-2025-34291 per the vendor's security advisory
  2. Restrict CORS origins — configure Langflow to only allow requests from explicitly trusted origins
  3. Rotate all stored API credentials — any API keys stored in Langflow should be rotated, particularly if the instance was publicly accessible
  4. Audit access logs — review Langflow access logs for unexpected cross-origin refresh token requests

Network Controls

  • Restrict Langflow access to VPN or internal networks — do not expose Langflow instances directly to the internet
  • Implement authentication at the reverse proxy layer — require SSO or client certificate authentication before Langflow is reachable
  • Monitor for anomalous session refresh activity — alert on refresh token usage from unexpected IP addresses or user agents

Cookie Security Hardening

Review and apply the following cookie security attributes to all session-related cookies:

  • SameSite=Strict or SameSite=Lax (not None) for authentication cookies
  • HttpOnly to prevent JavaScript access
  • Secure to ensure HTTPS-only transmission
  • Explicit domain binding to prevent subdomain token theft

CISA KEV Entry

CISA added CVE-2025-34291 to the KEV catalog on May 21, 2026:

FieldValue
Vendor/ProjectLangflow
ProductLangflow
Vulnerability NameLangflow Origin Validation Error Vulnerability
Date Added2026-05-21
Required ActionApply mitigations per vendor instructions or discontinue use if mitigations are unavailable

References

  • CISA KEV — CVE-2025-34291
  • NVD — CVE-2025-34291

Related Reading

  • CVE-2026-44338: PraisonAI Auth Bypass Targeted Within Hours
  • CISA New Langflow Flaw Actively Exploited
  • CVE-2026-33017: Langflow RCE Exploited in 20 Hours
#Langflow#CORS#CISA KEV#Session Hijack#AI Platform#CVE#Actively Exploited

Related Articles

CVE-2025-68613: n8n Remote Code Execution via Improper

CISA adds CVE-2025-68613 to the Known Exploited Vulnerabilities catalog — a CVSS 9.9 flaw in n8n's workflow expression evaluation system that enables...

5 min read

CVE-2026-45402: Open WebUI File ID Authorization Bypass

A high-severity authorization bypass in Open WebUI prior to 0.9.5 allows authenticated users to attach arbitrary files to resources they do not own via...

2 min read

CVE-2025-29635: D-Link DIR-823X Command Injection Vulnerability

A command injection flaw in end-of-life D-Link DIR-823X routers allows authenticated remote attackers to execute arbitrary OS commands. CISA has added...

3 min read
Back to all Security Alerts