{"answers":{"affected":"3 open source packages ship an affected version, including flask-cors and Flask-Cors. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6221 exists.","fix":"Upgrade flask-cors to 4.0.2 or later.","what":"CVE-2024-6221 is a medium-severity vulnerability in corydolphin/flask-cors, published on 18 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-6221 and fix it if it is affected.\n\nWhat it is: CVE-2024-6221 is a medium-severity vulnerability in corydolphin/flask-cors, published on 18 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6221 exists.\n\nAffected packages and fixed versions:\n- flask-cors (PyPI): affected all versions; fixed in 4.0.2\n- flask-cors (PyPI): affected all versions; fixed in 4.0.2\n- Flask-Cors (PyPI): affected all versions; fixed in 4.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-6221/ (Markdown: https://insights.sbomify.com/CVE-2024-6221/index.md)","id":"CVE-2024-6221","markdown":"https://insights.sbomify.com/CVE-2024-6221/index.md","name":"CVE-2024-6221","record":{"aliases":["DEBIAN-CVE-2024-6221","GHSA-hxwh-jpp2-84pm","OESA-2024-2198","PYSEC-2024-71","ROOT-APP-PYPI-CVE-2024-6221","UBUNTU-CVE-2024-6221"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Flask CORS library","requires_auth":"none","summary":"The library defaults to allowing private network access via CORS, exposing internal resources to external attackers for data theft or network intrusion.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"flask-cors","vendor":"corydolphin"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.0"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"}],"description":"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. 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Improper Access Control in corydolphin/flask-cors","id":"CVE-2024-6221","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"Privilege escalation in Docker Desktop","id":"CVE-2024-6222"},"packages":[{"ecosystem":"PyPI","fixed":["4.0.2"],"introduced":["0"],"last_affected":[],"package":"Flask-Cors","purl":null,"source":"GHSA-hxwh-jpp2-84pm"},{"ecosystem":"PyPI","fixed":["4.0.2"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"GHSA-hxwh-jpp2-84pm"},{"ecosystem":"PyPI","fixed":["4.0.2"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"PYSEC-2024-71"}],"prev":{"headline":"简数采集器 (Keydatas) \u003c= 2.5.2 - Unauthenticated Arbitrary File Upload","id":"CVE-2024-6220"},"products":["corydolphin/flask-cors"],"published":"2024-08-18","related":[{"cvss_score":5.3,"headline":"Log Injection Vulnerability in corydolphin/flask-cors","id":"CVE-2024-1681","kev_date_added":null,"published":"2024-04-19"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-07","vendors":["corydolphin"]},"summary":"The library defaults to allowing private network access via CORS, exposing internal resources to external attackers for data theft or network intrusion.","url":"https://insights.sbomify.com/CVE-2024-6221/"}