Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | flask-cors | < 4.0.2 | 4.0.2 |
References
- https://github.com/corydolphin/flask-cors/commit/03aa3f8e2256437f7bad96422a747b98ab5e31bf
- https://huntr.com/bounties/a42935fc-6f57-4818-bca4-3d528235df4d
- https://github.com/corydolphin/flask-cors/commit/7ae310c56ac30e0b94fb42129aa377bf633256ec
- https://github.com/advisories/GHSA-hxwh-jpp2-84pm
- https://nvd.nist.gov/vuln/detail/CVE-2024-6221
- https://github.com/corydolphin/flask-cors/issues/362
- https://github.com/corydolphin/flask-cors/pull/363
- https://github.com/corydolphin/flask-cors/pull/368
- https://github.com/corydolphin/flask-cors/commit/c8514760cf03fcce16d77f6db7007aad429c4548
- https://github.com/corydolphin/flask-cors
- https://github.com/corydolphin/flask-cors/releases
- https://github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-260.yaml
- https://github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-71.yaml
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-284- Platform
- Python (PyPI)
- Package
flask-cors- Disclosed
- 18.08.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2024-71 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2024-260 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-hxwh-jpp2-84pm - CC BY 4.0
Vulnerability history: flask-cors
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 6
- First → latest
- 08.2020 03.2025
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 2
- Medium 4
Disclosures per year
- 2020: 1
- 2021: 0
- 2022: 0
- 2023: 0
- 2024: 2
- 2025: 3
- 2026: 0
-
Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.