Quick answers
- Is CVE-2024-6221 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2024-6221 being exploited in the wild.
- How severe is CVE-2024-6221?
- High severity, with a CVSS score of 7.5, published 18 August 2024.
- Which products and versions are affected?
- Flask-Cors (PyPI) < 4.0.2, ECOSYSTEM:introduced=0,fixed=4.0.2, ECOSYSTEM:introduced=0,last_affected=4.0.1.
- Is there a fix for CVE-2024-6221?
- Yes. Flask-Cors (PyPI): upgrade to 4.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2024-6221 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2024-6221?
- Check whether you run Flask-Cors (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- Flask-Cors (PyPI): upgrade to 4.0.2 or later
pip install "Flask-Cors>=4.0.2"
Technical details
A vulnerability in Flask-Cors version 4.0.1 (and earlier) causes the 'Access-Control-Allow-Private-Network' CORS header to be set to 'true' by default without a configuration option to disable it. This behavior violates the Private Network Access (PNA) specification, which is designed to prevent public websites from making unauthorized requests to internal or local network endpoints. An attacker can exploit this by hosting a malicious website that, when visited by a user inside a private network, can successfully perform cross-origin requests to internal services that use the vulnerable Flask-Cors configuration. This can result in the unauthorized disclosure of sensitive information from internal APIs. The issue is resolved in version 4.0.2.
Affected products
- corydolphin Flask-Cors < 4.0.2
Identifiers
- CVE-2024-6221
- GHSA-hxwh-jpp2-84pm
- PYSEC-2024-260
- PYSEC-2024-71
Timeline
- 2024-08-18: advisory: GitHub Advisory published
- 2024-08-18: disclosed: NVD publication date