---
id: CVE-2024-6221
aliases:
  - GHSA-hxwh-jpp2-84pm
  - PYSEC-2024-71
title: >-
  Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be
  set to true by default
summary: >-
  Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be
  set to true by default
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
vendor: flask-cors
product: flask-cors
ecosystem: pip
affected:
  - flask-cors < 4.0.2
patched:
  - flask-cors 4.0.2
published: '2024-08-18'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:18.161615963Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-hxwh-jpp2-84pm'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-6221'
  - url: 'https://github.com/corydolphin/flask-cors/issues/362'
  - url: 'https://github.com/corydolphin/flask-cors/pull/363'
  - url: 'https://github.com/corydolphin/flask-cors/pull/368'
  - url: >-
      https://github.com/corydolphin/flask-cors/commit/03aa3f8e2256437f7bad96422a747b98ab5e31bf
  - url: >-
      https://github.com/corydolphin/flask-cors/commit/7ae310c56ac30e0b94fb42129aa377bf633256ec
  - url: >-
      https://github.com/corydolphin/flask-cors/commit/c8514760cf03fcce16d77f6db7007aad429c4548
  - url: 'https://github.com/corydolphin/flask-cors'
  - url: 'https://github.com/corydolphin/flask-cors/releases'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-260.yaml
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-71.yaml
  - url: 'https://huntr.com/bounties/a42935fc-6f57-4818-bca4-3d528235df4d'
tags:
  - osv
  - pip
epss: 0.00718
epssPercentile: 0.51794
ingestedAt: '2026-07-09T18:56:35.245Z'
---

## Overview

A vulnerability in corydolphin/flask-cors version 4.0.1 allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default, without any configuration option. This behavior can expose private network resources to unauthorized external access, leading to significant security risks such as data breaches, unauthorized access to sensitive information, and potential network intrusions.

## Affected packages

- `flask-cors < 4.0.2`

## Remediation

Upgrade to a patched release:

- `flask-cors 4.0.2`
