{"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-1681 exists.","fix":"Upgrade flask-cors to 4.0.1 or later.","what":"CVE-2024-1681 is a medium-severity vulnerability in corydolphin/flask-cors, published on 19 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-1681 and fix it if it is affected.\n\nWhat it is: CVE-2024-1681 is a medium-severity vulnerability in corydolphin/flask-cors, published on 19 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1681 exists.\n\nAffected packages and fixed versions:\n- flask-cors (PyPI): affected all versions up to 4.0.0; no fix listed\n- flask-cors (PyPI): affected all versions; fixed in 4.0.1\n- flask-cors (PyPI): affected all versions; fixed in 4.0.1\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-1681/ (Markdown: https://insights.sbomify.com/CVE-2024-1681/index.md)","id":"CVE-2024-1681","markdown":"https://insights.sbomify.com/CVE-2024-1681/index.md","name":"CVE-2024-1681","record":{"aliases":["DEBIAN-CVE-2024-1681","GHSA-84pr-m4jr-85g5","OESA-2024-1713","PYSEC-2024-271","ROOT-APP-PYPI-CVE-2024-1681","UBUNTU-CVE-2024-1681","openSUSE-SU-2024:14293-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_modify","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Flask CORS library","requires_auth":"none","summary":"Attackers can inject fake log entries via CRLF sequences in request paths when debug logging is enabled, corrupting logs and hiding malicious activity.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"flask-cors","vendor":"corydolphin"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-117","name":"Improper Output Neutralization for Logs"}],"description":"corydolphin/flask-cors is vulnerable to log injection when the log level is set to debug. An attacker can inject fake log entries into the log file by sending a specially crafted GET request containing a CRLF sequence in the request path. This vulnerability allows attackers to corrupt log files, potentially covering tracks of other attacks, confusing log post-processing tools, and forging log entries. The issue is due to improper output neutralization for logs.","ecosystems":["PyPI","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Log Injection Vulnerability in corydolphin/flask-cors","id":"CVE-2024-1681","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"other","year":"2024"},"n_packages":4,"n_references":1,"next":{"headline":"Unclaimed S3 Bucket Reference in psf/requests Documentation","id":"CVE-2024-1682"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["4.0.0"],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"PYSEC-2024-271"},{"ecosystem":"PyPI","fixed":["4.0.1"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":null,"source":"GHSA-84pr-m4jr-85g5"},{"ecosystem":"PyPI","fixed":["4.0.1"],"introduced":["0"],"last_affected":[],"package":"flask-cors","purl":"pkg:pypi/flask-cors","source":"GHSA-84pr-m4jr-85g5"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["4.0.1-1.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask-Cors","purl":"pkg:rpm/opensuse/python-Flask-Cors\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14293-1"}],"prev":{"headline":"Cross-site scripting in Premium Addons for Elementor – Powerful Elementor Templates \u0026 Widgets","id":"CVE-2024-1680"},"products":["corydolphin/flask-cors"],"published":"2024-04-19","related":[{"cvss_score":6.5,"headline":"Improper Access Control in corydolphin/flask-cors","id":"CVE-2024-6221","kev_date_added":null,"published":"2024-08-18"}],"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["corydolphin"]},"summary":"Attackers can inject fake log entries via CRLF sequences in request paths when debug logging is enabled, corrupting logs and hiding malicious activity.","url":"https://insights.sbomify.com/CVE-2024-1681/"}