---
id: CVE-2024-6839
aliases:
  - GHSA-7rxf-gvfg-47g4
  - PYSEC-2026-1384
title: Flask-CORS improper regex path matching vulnerability
summary: Flask-CORS improper regex path matching vulnerability
severity: medium
cvss: 4.3
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'
vendor: flask-cors
product: flask-cors
ecosystem: pip
affected:
  - flask-cors < 6.0.0
patched:
  - flask-cors 6.0.0
published: '2025-03-20'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:49:48.444339292Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-7rxf-gvfg-47g4'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-6839'
  - url: >-
      https://github.com/corydolphin/flask-cors/commit/e970988bea563e05e8b8f53fa7bcc134b5bf5c5f
  - url: 'https://github.com/corydolphin/flask-cors'
  - url: >-
      https://github.com/corydolphin/flask-cors/blob/4.0.1/flask_cors/core.py#L73
  - url: 'https://huntr.com/bounties/403eb1fc-86f4-4820-8eba-0f3dfae9f2b4'
  - url: 'https://lists.debian.org/debian-lts-announce/2025/05/msg00049.html'
tags:
  - osv
  - pip
epss: 0.00726
epssPercentile: 0.52138
ingestedAt: '2026-07-08T18:25:47.219Z'
---

## Overview

corydolphin/flask-cors version 5.0.1 contains an improper regex path matching vulnerability. The plugin prioritizes longer regex patterns over more specific ones when matching paths, which can lead to less restrictive CORS policies being applied to sensitive endpoints. This mismatch in regex pattern priority allows unauthorized cross-origin access to sensitive data or functionality, potentially exposing confidential information and increasing the risk of unauthorized actions by malicious actors.

## Affected packages

- `flask-cors < 6.0.0`

## Remediation

Upgrade to a patched release:

- `flask-cors 6.0.0`
