☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.3 🐛 CWE-178
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-6866

CVE-2024-6866 Information Disclosure in Corydolphin
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-09-24 06:00 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.71%
👁️
0.71% probability
17.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-6866 is a security vulnerability in the corydolphin/flask-cors Python library, version 4.01. The flaw arises from the misuse of the try_match function, which was originally designed for case-insensitive host matching, but is applied to URL path matching. Since URL paths are case-sensitive, this leads to a mismatch where unauthorized origins can access restricted paths, potentially causing data exposure and leaks. The CVSS score is 5.3 (Medium), and no patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the PyPI package flask-cors. Organizations using this library in their Flask applications should immediately assess their exposure. Since the package is widely used for Cross-Origin Resource Sharing (CORS) configuration, the flaw could allow attackers to bypass intended access controls. No patch is available, so mitigation must rely on configuration changes or temporary workarounds.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
  • Base Score: 5.3 (Medium)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: Low (C:L)
  • Integrity Impact: None (I:N)
  • Availability Impact: None (A:N)

The threat level is medium due to the low complexity and network attack vector, but the impact is limited to confidentiality.

Deep Dive & Mechanics

The vulnerability is rooted in the try_match function within flask-cors. This function uses regex matching with the re.IGNORECASE flag, making it case-insensitive. While this is appropriate for hostnames (which are case-insensitive per RFC), it is incorrect for URL paths, which are case-sensitive. For example, a path like /Admin would match a rule intended for /admin, allowing an attacker to bypass CORS restrictions by simply changing the case of the path.

The core issue is in the try_match function's regex construction. When matching paths, the function does not account for case sensitivity, leading to false positives. This can be exploited by an attacker to access resources that should be restricted to specific origins.

Vulnerable vs. Patched Code

Vulnerable Code (flask-cors 4.01):

def try_match(pattern, target):
    # This function is used for both hosts and paths
    # It uses re.IGNORECASE, which is wrong for paths
    regex = re.compile(re.escape(pattern) + '$', re.IGNORECASE)
    return regex.match(target) is not None

Patched Code (Hypothetical Fix):

def try_match(pattern, target, case_sensitive=True):
    # For paths, case_sensitive should be True
    flags = 0 if case_sensitive else re.IGNORECASE
    regex = re.compile(re.escape(pattern) + '$', flags)
    return regex.match(target) is not None

The fix would involve adding a case_sensitive parameter and using it appropriately when matching paths versus hosts.

Exploitation & Lab Setup

Red Team

To exploit this vulnerability, an attacker would craft a request with a case-modified path to bypass CORS restrictions. For example, if a Flask application has a CORS rule allowing only https://trusted.com to access /api/secret, an attacker could send a request from https://evil.com to /API/secret (note the uppercase). The try_match function would treat /API/secret as matching /api/secret, thus allowing the cross-origin request.

Proof of Concept (Python):

import requests

# Target Flask app with CORS configured for /api/secret only
url = "http://target.com/API/secret"
headers = {"Origin": "https://evil.com"}
response = requests.get(url, headers=headers)
print(response.headers.get("Access-Control-Allow-Origin"))
# If the response includes the evil origin, the exploit works

Blue Team

To detect exploitation attempts, monitor for requests to paths with unusual casing (e.g., /Admin, /API/). Also, look for Origin headers that do not match the expected list. Use the following detection rules.

Indicators of Compromise (IOCs)

  • Network: HTTP requests with Origin header set to an unauthorized domain and a path with mixed case (e.g., /API/secret instead of /api/secret).
  • Logs: Access logs showing 200 responses to paths with case variations that should have been blocked.
  • File: Presence of flask-cors version 4.01 in Python environment.

Detection Engineering

YARA Rule

rule flask_cors_case_sensitive_bypass {
    meta:
        description = "Detects flask-cors version 4.01 with case-insensitive path matching"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-6866"
    strings:
        $a = "try_match" ascii
        $b = "re.IGNORECASE" ascii
        $c = "flask_cors" ascii
    condition:
        all of ($a, $b, $c)
}

Sigma Rule

title: CVE-2024-6866 - Flask-CORS Case-Insensitive Path Bypass
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with case-modified paths that bypass CORS restrictions
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains: 
            - '/API/'
            - '/Admin/'
            - '/SECRET/'
    condition: selection
falsepositives:
    - Legitimate use of uppercase paths
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-6866 Flask-CORS Case-Insensitive Path Bypass"; flow:to_server; content:"Origin"; http_header; content:"/API/"; http_uri; nocase; sid:1000001; rev:1;)

Remediation & Mitigation

Since no official patch is available, the following mitigations are recommended:

  1. Upgrade: Monitor the flask-cors repository for a patched version and upgrade immediately when available.
  2. Workaround: Implement custom middleware that performs case-sensitive path matching before CORS checks.
  3. Configuration: Restrict CORS origins to a whitelist and avoid using wildcard origins.
  4. Monitoring: Deploy the detection rules above to identify exploitation attempts.
  5. Network Segmentation: Limit exposure of Flask applications to untrusted networks.

Valters IT
Securing your digital frontier.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-6866/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.