The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-63386

CVE-2025-63386: Langgenius Dify Auth Bypass Vulnerability

CVE-2025-63386 is an authentication bypass flaw in Langgenius Dify v1.9.1 caused by CORS misconfiguration that allows arbitrary domains to make authenticated requests. This article covers technical details, impact, and fixes.

Published: March 25, 2026

CVE-2025-63386 Overview

A Cross-Origin Resource Sharing (CORS) misconfiguration vulnerability has been identified in Dify v1.9.1, an open-source LLM application development platform by Langgenius. The vulnerability exists in the /console/api/setup endpoint, which implements an insecure CORS policy that reflects any Origin header while simultaneously enabling Access-Control-Allow-Credentials: true. This configuration permits arbitrary external domains to make authenticated requests to the vulnerable endpoint, potentially exposing sensitive data and enabling unauthorized actions.

It is worth noting that the vendor disputes this finding, stating that the endpoint configuration is intentional to support bootstrap functionality. However, security researchers maintain that this permissive CORS policy introduces significant risk in production environments.

Critical Impact

Arbitrary external domains can make authenticated cross-origin requests, potentially leading to credential theft, session hijacking, and unauthorized access to sensitive Dify console functionality.

Affected Products

  • Langgenius Dify v1.9.1
  • Dify installations with default CORS configurations
  • Self-hosted Dify deployments exposing the /console/api/setup endpoint

Discovery Timeline

  • 2025-12-18 - CVE-2025-63386 published to NVD
  • 2026-02-11 - Last updated in NVD database

Technical Details for CVE-2025-63386

Vulnerability Analysis

This CORS misconfiguration vulnerability (CWE-346: Origin Validation Error) occurs when the Dify application fails to properly validate the Origin header in cross-origin requests. The /console/api/setup endpoint reflects any Origin header value back in the Access-Control-Allow-Origin response header while simultaneously setting Access-Control-Allow-Credentials: true. This dangerous combination allows malicious websites to bypass the browser's same-origin policy and make authenticated requests on behalf of legitimate users.

When a user who is authenticated to a Dify instance visits a malicious website, that website can silently make requests to the Dify API with the user's credentials attached. The browser will include session cookies, authentication tokens, and other credentials because the CORS policy explicitly permits this behavior. This can lead to unauthorized data exfiltration, configuration changes, or other malicious actions depending on the privileges of the authenticated user.

Root Cause

The root cause of this vulnerability lies in the implementation of a wildcard-like CORS policy that reflects any incoming Origin header value. The endpoint configuration dynamically mirrors the Origin header from incoming requests in the Access-Control-Allow-Origin response without validating whether the origin is trusted. Combined with the Access-Control-Allow-Credentials: true directive, this creates a permissive policy that effectively nullifies the security benefits of the same-origin policy for authenticated requests. While the vendor indicates this was intentional for bootstrap support, the security implications of such a permissive configuration warrant careful consideration in production deployments.

Attack Vector

An attacker exploits this vulnerability by hosting a malicious website that makes cross-origin requests to a target Dify instance. The attack proceeds as follows:

  1. The attacker identifies a target Dify installation with the vulnerable CORS configuration
  2. The attacker creates a malicious webpage containing JavaScript that makes requests to the Dify /console/api/setup endpoint
  3. When a victim who is authenticated to the target Dify instance visits the attacker's webpage, the malicious JavaScript executes
  4. The browser sends the cross-origin request with the victim's credentials because the CORS policy permits it
  5. The attacker's JavaScript can read the response data due to the permissive CORS headers, enabling data theft or further exploitation

The attack leverages the browser's built-in credential handling - the victim does not need to take any explicit action beyond visiting the attacker-controlled page while having an active session with the Dify application.

Detection Methods for CVE-2025-63386

Indicators of Compromise

  • Unexpected cross-origin requests to the /console/api/setup endpoint from unknown or suspicious domains
  • Access logs showing requests with Origin headers from domains not associated with legitimate Dify usage
  • Unusual patterns of API requests originating from user sessions that correlate with visits to external websites
  • Response headers containing Access-Control-Allow-Origin values matching arbitrary external domains

Detection Strategies

  • Monitor HTTP access logs for requests to /console/api/setup with unusual or unexpected Origin headers
  • Implement web application firewall (WAF) rules to alert on cross-origin requests from untrusted domains
  • Review application configurations for overly permissive CORS policies that reflect Origin headers
  • Deploy browser security extensions or Content Security Policy (CSP) headers to restrict cross-origin request capabilities

Monitoring Recommendations

  • Establish a baseline of legitimate Origin headers for your Dify deployment and alert on deviations
  • Configure SIEM rules to correlate cross-origin requests with user session activity to detect potential CSRF-like attacks
  • Implement real-time monitoring of CORS-related response headers in application traffic
  • Review authentication logs for session anomalies that may indicate credential theft via CORS exploitation

How to Mitigate CVE-2025-63386

Immediate Actions Required

  • Audit your Dify deployment's CORS configuration and restrict the Access-Control-Allow-Origin header to explicitly trusted domains
  • Implement an allowlist approach for Origin validation rather than reflecting arbitrary Origin headers
  • Consider disabling Access-Control-Allow-Credentials unless absolutely required for legitimate cross-origin authenticated requests
  • Apply network-level restrictions to limit access to the /console/api/setup endpoint from trusted networks only
  • Review the GitHub Pull Request #32224 for potential configuration changes

Patch Information

As of the last NVD update, the vendor (Langgenius) disputes this vulnerability, indicating the endpoint configuration is intentional for bootstrap support. Organizations should review the Dify GitHub Discussions for the latest vendor guidance and potential configuration updates. Technical details and analysis are available in the referenced GitHub Gist Code Snippet and GitHub Gist Code Analysis.

Workarounds

  • Deploy a reverse proxy (such as nginx or Apache) in front of Dify to override CORS headers with a restrictive policy
  • Implement network segmentation to restrict access to the Dify console API to trusted internal networks only
  • Use a web application firewall (WAF) to block cross-origin requests from untrusted domains
  • Configure additional authentication mechanisms that are not vulnerable to cross-origin credential inclusion
bash
# Example nginx configuration to enforce restrictive CORS policy
# Add to your nginx server block for the Dify application

location /console/api/setup {
    # Only allow specific trusted origins
    set $cors_origin "";
    if ($http_origin ~* "^https://(trusted-domain\.com|app\.trusted\.org)$") {
        set $cors_origin $http_origin;
    }
    
    add_header 'Access-Control-Allow-Origin' $cors_origin always;
    add_header 'Access-Control-Allow-Credentials' 'true' always;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
    add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,Content-Type,Authorization' always;
    
    # Handle preflight requests
    if ($request_method = 'OPTIONS') {
        return 204;
    }
    
    proxy_pass http://dify_backend;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechLanggenius Dify

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • NVD-CWE-noinfo

  • CWE-346
  • Technical References
  • GitHub Gist Code Snippet

  • GitHub Gist Code Analysis

  • GitHub Discussion on Dify

  • GitHub Dify Pull Request #32224
  • Related CVEs
  • CVE-2025-56157: Langgenius Dify Auth Bypass Vulnerability

  • CVE-2025-63388: Langgenius Dify Auth Bypass Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English