{"answers":{"affected":"3 open source packages ship an affected version, including flask-cors. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6839 exists.","fix":"Upgrade flask-cors to 6.0.0 or later.","what":"CVE-2024-6839 is a medium-severity vulnerability in corydolphin/flask-cors, published on 20 Mar 2025. 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-6839 and fix it if it is affected.\n\nWhat it is: CVE-2024-6839 is a medium-severity vulnerability in corydolphin/flask-cors, published on 20 Mar 2025. 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-6839 exists.\n\nAffected packages and fixed versions:\n- flask-cors (PyPI): affected all versions; fixed in 6.0.0\n- flask-cors (PyPI): affected all versions; fixed in 6.0.0\n- flask-cors (PyPI): affected all versions; fixed in 6.0.0\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-6839/ (Markdown: https://insights.sbomify.com/CVE-2024-6839/index.md)","id":"CVE-2024-6839","markdown":"https://insights.sbomify.com/CVE-2024-6839/index.md","name":"CVE-2024-6839","record":{"aliases":["CLSA-2026-1787900734","DEBIAN-CVE-2024-6839","ECHO-ead3-0d9b-e590","GHSA-7rxf-gvfg-47g4","PYSEC-2026-1384","ROOT-APP-PYPI-CVE-2024-6839","UBUNTU-CVE-2024-6839"],"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":"Improper regex matching in flask-cors allows unauthorized cross-origin access to sensitive endpoints, exposing confidential data.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"flask-cors","vendor":"flask-cors_project"}],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","version":"3.0"},"cwes":[{"id":"CWE-41","name":"Improper Resolution of Path Equivalence"}],"description":"corydolphin/flask-cors version 4.0.1 contains an improper regex path matching vulnerability. The plugin prioritizes longer regex patterns over more specific ones when matching paths, which can lead to less restrictive CORS policies being applied to sensitive endpoints. This mismatch in regex pattern priority allows unauthorized cross-origin access to sensitive data or functionality, potentially exposing confidential information and increasing the risk of unauthorized actions by malicious actors.","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 Regex Path Matching in corydolphin/flask-cors","id":"CVE-2024-6839","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":3,"n_references":1,"next":{"headline":"Automation-controller: gain access to the k8s api server via job execution with container group","id":"CVE-2024-6840"},"packages":[{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":null,"source":"GHSA-7rxf-gvfg-47g4"},{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"GHSA-7rxf-gvfg-47g4"},{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"PYSEC-2026-1384"}],"prev":{"headline":"Uncontrolled Resource Consumption in mlflow/mlflow","id":"CVE-2024-6838"},"products":["corydolphin/flask-cors"],"published":"2025-03-20","related":[{"cvss_score":5.3,"headline":"Inconsistent CORS Matching Due to Handling of '+' in URL Path in corydolphin/flask-cors","id":"CVE-2024-6844","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":5.3,"headline":"Case-Insensitive Path Matching in corydolphin/flask-cors","id":"CVE-2024-6866","kev_date_added":null,"published":"2025-03-20"}],"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-11-03","vendors":["corydolphin"]},"summary":"Improper regex matching in flask-cors allows unauthorized cross-origin access to sensitive endpoints, exposing confidential data.","url":"https://insights.sbomify.com/CVE-2024-6839/"}