Detect CVE-2025-34291: Langflow Origin Validation Error Exploitation in Microsoft Sentinel
Detects exploitation of CVE-2025-34291, an origin validation error (CWE-346) in Langflow that allows attackers to bypass origin checks. This vulnerability is actively exploited in the wild (CISA KEV) and may enable unauthorized access to Langflow API endpoints, flow execution, or administrative functions by bypassing cross-origin restrictions.
MITRE ATT&CK
KQL Detection Query
union DeviceNetworkEvents, W3CIISLog, AzureDiagnostics
| where TimeGenerated >= ago(24h)
| where (
(csHost has_any ("langflow", "langflow-api") or csUriStem has_any ("/api/v1/", "/api/v2/", "/flows", "/run", "/build"))
or (ResourceType == "APPLICATIONGATEWAYS" and requestUri_s has_any ("/api/v1/", "/flows", "/run"))
)
| where csRefererHeader !has csHost or csRefererHeader has_any ("null", "about:blank") or isempty(csRefererHeader)
| where csMethod in ("POST", "PUT", "DELETE", "PATCH")
| where scStatus in (200, 201, 202, 204)
| extend SuspiciousOrigin = case(
isempty(csRefererHeader), "Missing Referer",
csRefererHeader has "null", "Null Origin",
csRefererHeader !has csHost, "Cross-Origin Mismatch",
"Legitimate"
)
| where SuspiciousOrigin != "Legitimate"
| project TimeGenerated, csClientIP, csMethod, csUriStem, csRefererHeader, scStatus, SuspiciousOrigin, csUserAgent
| summarize RequestCount=count(), Methods=make_set(csMethod), Endpoints=make_set(csUriStem) by csClientIP, SuspiciousOrigin, bin(TimeGenerated, 5m)
| where RequestCount > 2 Detects suspicious cross-origin requests to Langflow API endpoints where the Origin or Referer header is absent, null, or mismatched, which may indicate exploitation of CVE-2025-34291 origin validation bypass.
Data Sources
Required Tables
False Positives & Tuning
- Internal automation or API clients that do not send Origin/Referer headers
- Health check endpoints called by load balancers without referrer headers
- Browser extensions or API testing tools (Postman, curl) used by legitimate developers
- Server-side rendering frameworks that make backend-to-backend API calls
Other platforms for CVE-2025-34291
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1CVE-2025-34291 - Missing Origin Header Flow Execution
Expected signal: Web server access log entry with POST to /api/v1/run/FLOW_ID, empty Referer field, HTTP 200 response code, source IP of test machine
- Test 2CVE-2025-34291 - Null Origin Header Bypass Attempt
Expected signal: Web server log showing POST to /api/v1/flows with Origin: null and Referer: null headers, response code 200 or 201
- Test 3CVE-2025-34291 - Cross-Origin Mismatch API Access
Expected signal: Web server log entry with POST to /api/v1/build/ path, Origin and Referer headers showing external domain not matching Langflow host, response code 200-204
- Test 4CVE-2025-34291 - Automated Flow Enumeration Without Origin
Expected signal: Multiple GET requests to Langflow API endpoints within short timeframe from same source IP, all with empty Referer, varying response codes depending on authentication state
Unlock Pro Content
Get the full detection package for CVE-2025-34291 including response playbook, investigation guide, and atomic red team tests.