Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. flask-cors
  4. ›
  5. CVE-2024-6221

CVE-2024-6221: Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default

August 18, 2024 (updated April 7, 2025)

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.

References

  • github.com/advisories/GHSA-hxwh-jpp2-84pm
  • github.com/corydolphin/flask-cors
  • github.com/corydolphin/flask-cors/commit/03aa3f8e2256437f7bad96422a747b98ab5e31bf
  • github.com/corydolphin/flask-cors/commit/7ae310c56ac30e0b94fb42129aa377bf633256ec
  • github.com/corydolphin/flask-cors/commit/c8514760cf03fcce16d77f6db7007aad429c4548
  • github.com/corydolphin/flask-cors/issues/362
  • github.com/corydolphin/flask-cors/pull/363
  • github.com/corydolphin/flask-cors/pull/368
  • github.com/corydolphin/flask-cors/releases
  • github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-71.yaml
  • huntr.com/bounties/a42935fc-6f57-4818-bca4-3d528235df4d
  • nvd.nist.gov/vuln/detail/CVE-2024-6221

Code Behaviors & Features

Detect and mitigate CVE-2024-6221 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.0.2

Fixed versions

  • 4.0.2

Solution

Upgrade to version 4.0.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-284: Improper Access Control

Source file

pypi/flask-cors/CVE-2024-6221.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:00 +0000.