{"answers":{"affected":"3 open source packages ship an affected version, including werkzeug and Werkzeug. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-49766 in the wild and no public exploit code.","fix":"Upgrade werkzeug to 3.0.6 or later.","what":"CVE-2024-49766 is a medium-severity vulnerability in pallets werkzeug, published on 25 Oct 2024."},"fix_prompt":"Check this codebase for CVE-2024-49766 and fix it if it is affected.\n\nWhat it is: CVE-2024-49766 is a medium-severity vulnerability in pallets werkzeug, published on 25 Oct 2024. \nExploitation: There is no known exploitation of CVE-2024-49766 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- werkzeug (PyPI): affected all versions; fixed in 3.0.6\n- werkzeug (PyPI): affected all versions; fixed in 3.0.6\n- Werkzeug (PyPI): affected all versions; fixed in 3.0.6\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-49766/ (Markdown: https://insights.sbomify.com/CVE-2024-49766/index.md)","id":"CVE-2024-49766","markdown":"https://insights.sbomify.com/CVE-2024-49766/index.md","name":"CVE-2024-49766","record":{"aliases":["CLEANSTART-2026-KC63022","CLEANSTART-2026-LS94875","ECHO-9c5b-9fe7-f077","GHSA-f9vj-2wh5-fj8j","MINI-c474-jj9x-pjjm","MINI-h843-xcjh-979v","PYSEC-2026-2045","ROOT-APP-PYPI-CVE-2024-49766"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[{"product":"werkzeug","vendor":"palletsprojects"}],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Werkzeug is a Web Server Gateway Interface web application library. On Python \u003c 3.11 on Windows, os.path.isabs() does not catch UNC paths like //server/share. Werkzeug's safe_join() relies on this check, and so can produce a path that is not safe, potentially allowing unintended access to data. Applications using Python \u003e= 3.11, or not using Windows, are not vulnerable. Werkzeug version 3.0.6 contains a patch.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Werkzeug safe_join not safe on Windows","id":"CVE-2024-49766","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":null,"year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"Werkzeug possible resource exhaustion when parsing file data in forms","id":"CVE-2024-49767"},"packages":[{"ecosystem":"PyPI","fixed":["3.0.6"],"introduced":["0"],"last_affected":[],"package":"Werkzeug","purl":null,"source":"GHSA-f9vj-2wh5-fj8j"},{"ecosystem":"PyPI","fixed":["3.0.6"],"introduced":["0"],"last_affected":[],"package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"GHSA-f9vj-2wh5-fj8j"},{"ecosystem":"PyPI","fixed":["3.0.6"],"introduced":["0"],"last_affected":[],"package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"PYSEC-2026-2045"}],"prev":{"headline":"Bypass of Discourse Connect using other login paths if enabled in Discourse","id":"CVE-2024-49765"},"products":["werkzeug"],"published":"2024-10-25","related":[{"cvss_score":9.8,"headline":"Other in n/a","id":"CVE-2022-29361","kev_date_added":null,"published":"2022-05-24"},{"cvss_score":8,"headline":"Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning","id":"CVE-2023-46136","kev_date_added":null,"published":"2023-10-24"},{"cvss_score":7.5,"headline":"Werkzeug may allow high resource usage when parsing multipart form data with many fields","id":"CVE-2023-25577","kev_date_added":null,"published":"2023-02-14"},{"cvss_score":7.5,"headline":"Pallets Werkzeug vulnerable to Path Traversal","id":"CVE-2019-14322","kev_date_added":null,"published":"2019-07-28"},{"cvss_score":6.3,"headline":"Werkzeug safe_join() allows Windows special device names","id":"CVE-2026-27199","kev_date_added":null,"published":"2026-02-21"},{"cvss_score":6.3,"headline":"Werkzeug safe_join() allows Windows special device names with compound extensions","id":"CVE-2026-21860","kev_date_added":null,"published":"2026-01-08"},{"cvss_score":6.3,"headline":"Werkzeug safe_join() allows Windows special device names","id":"CVE-2025-66221","kev_date_added":null,"published":"2025-11-29"}],"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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-31","vendors":["pallets"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2024-49766/"}