A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-6866

CVE-2024-6866: Flask-CORS Information Disclosure Flaw

CVE-2024-6866 is an information disclosure vulnerability in Flask-CORS 4.0.1 caused by case-insensitive path matching that allows unauthorized access to restricted paths. This article covers technical details, affected versions, and mitigations.

Published: May 26, 2026

CVE-2024-6866 Overview

CVE-2024-6866 affects corydolphin/flask-cors version 4.0.1, a popular Cross-Origin Resource Sharing (CORS) extension for Flask applications. The vulnerability stems from case-insensitive URL path matching caused by reuse of the try_match function originally designed for host matching. Because URL paths are case-sensitive per RFC 3986 but the regex matching treats them as case-insensitive, attackers can request restricted paths using altered capitalization. This mismatch allows unauthorized origins to bypass CORS restrictions and access endpoints intended to be limited. The flaw is tracked under [CWE-178: Improper Handling of Case Sensitivity].

Critical Impact

Unauthorized cross-origin requests can reach restricted Flask endpoints, leading to sensitive data exposure across applications relying on Flask-CORS path-based access controls.

Affected Products

  • corydolphin/flask-cors version 4.0.1
  • Python web applications using Flask-CORS for origin restriction
  • Debian Long Term Support distributions packaging vulnerable flask-cors releases

Discovery Timeline

  • 2025-03-20 - CVE-2024-6866 published to the National Vulnerability Database
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-6866

Vulnerability Analysis

Flask-CORS allows developers to restrict cross-origin access on a per-path basis using regex resource patterns. In version 4.0.1, the library evaluates incoming request paths against these patterns through the try_match helper. That helper was implemented for host matching, where case insensitivity is correct behavior under RFC 3986. Applying the same logic to URL paths violates the standard, since path components must be compared as case-sensitive strings.

As a result, a CORS policy intended to protect /Admin will also match requests to /admin, /ADMIN, or any case variant. Attackers controlling an untrusted origin can craft requests targeting case-shifted paths that fall outside the configured allowlist but still match the regex used to grant CORS headers. The browser then accepts the response, exposing data from the protected endpoint.

Root Cause

The root cause is incorrect reuse of host-matching semantics for path comparison. The try_match function compiles the resource pattern with case-insensitive flags. Path-based access controls built on top of Flask-CORS therefore fail closed only for the exact casing developers anticipated, leaving variants exploitable.

Attack Vector

Exploitation is network-based and requires no authentication or user interaction. An attacker hosts a malicious origin that issues fetch or XMLHttpRequest calls to a target Flask application, varying the case of restricted path segments. When Flask-CORS returns permissive Access-Control-Allow-Origin headers due to the case-insensitive match, the browser releases the response body to the attacker's script, enabling data theft.

No verified public exploit code is available. See the Huntr Bounty Report for technical details from the original disclosure.

Detection Methods for CVE-2024-6866

Indicators of Compromise

  • Access logs showing requests to case-shifted variants of restricted paths (e.g., /Admin, /aDmIn) followed by successful 200 responses with CORS headers.
  • Origin request headers from domains not present in the application's documented allowlist.
  • Repeated preflight OPTIONS requests probing capitalization variants of sensitive endpoints.

Detection Strategies

  • Inventory Python dependencies and flag any installation of flask-cors==4.0.1 or earlier vulnerable releases.
  • Inspect Flask-CORS resource configurations for regex patterns that rely on case-sensitive path enforcement.
  • Replay restricted endpoint requests with altered casing in a staging environment and confirm whether CORS headers are returned.

Monitoring Recommendations

  • Forward web server and WAF logs to a centralized analytics platform and alert on anomalous Origin headers paired with sensitive paths.
  • Track outbound responses containing Access-Control-Allow-Origin for restricted routes that should never be exposed cross-origin.
  • Baseline normal path casing for each endpoint and alert when deviations appear in production traffic.

How to Mitigate CVE-2024-6866

Immediate Actions Required

  • Upgrade flask-cors to a fixed release beyond 4.0.1 as published by the maintainers and downstream distributions.
  • Audit all Flask-CORS resource patterns and replace path regexes that depend on exact casing with explicit allowlists.
  • For Debian systems, apply the update referenced in the Debian LTS Announcement.

Patch Information

The Flask-CORS maintainers addressed the issue in releases following 4.0.1 by correcting path comparison to be case-sensitive. Debian LTS published a fixed package through the May 2025 advisory. Review the Huntr Bounty Report for the upstream remediation reference.

Workarounds

  • Normalize incoming request paths to a canonical case at a reverse proxy and reject variants that do not match documented routes.
  • Implement server-side authorization checks on sensitive endpoints rather than relying solely on CORS for access control.
  • Restrict allowed origins to a strict allowlist and avoid wildcard * configurations until patched.
bash
# Configuration example: upgrade flask-cors to a patched release
pip install --upgrade 'flask-cors>4.0.1'
pip show flask-cors | grep -i version

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechFlask Cors

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.08%

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

  • Debian LTS Announcement
  • Related CVEs
  • CVE-2020-25032: Flask-CORS Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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