{"answers":{"affected":"12 open source packages ship an affected version, including vite.","exploited":"There is no known exploitation of CVE-2024-31207 in the wild and no public exploit code.","fix":"Upgrade vite to a fixed version for your release line: 2.9.18, 3.2.10, 4.5.3 or 5.0.13.","what":"CVE-2024-31207 is a medium-severity path traversal vulnerability in vitejs vite, published on 4 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-31207 and fix it if it is affected.\n\nWhat it is: CVE-2024-31207 is a medium-severity path traversal vulnerability in vitejs vite, published on 4 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-31207 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- vite (npm): affected from 2.7.0; fixed in 2.9.18\n- vite (npm): affected from 2.7.0; fixed in 2.9.18\n- vite (npm): affected from 3.0.0; fixed in 3.2.10\n- vite (npm): affected from 3.0.0; fixed in 3.2.10\n- vite (npm): affected from 4.0.0; fixed in 4.5.3\n- vite (npm): affected from 4.0.0; fixed in 4.5.3\n- vite (npm): affected from 5.0.0; fixed in 5.0.13\n- vite (npm): affected from 5.0.0; fixed in 5.0.13\n- vite (npm): affected from 5.1.0; fixed in 5.1.7\n- vite (npm): affected from 5.1.0; fixed in 5.1.7\n- vite (npm): affected from 5.2.0; fixed in 5.2.6\n- vite (npm): affected from 5.2.0; fixed in 5.2.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-31207/ (Markdown: https://insights.sbomify.com/CVE-2024-31207/index.md)","id":"CVE-2024-31207","markdown":"https://insights.sbomify.com/CVE-2024-31207/index.md","name":"CVE-2024-31207","record":{"aliases":["GHSA-8jhw-289h-jh2g","MINI-76f4-jr6c-p83w"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Vite build tool","requires_auth":"none","summary":"Vite's file system deny list fails to block directory patterns, allowing attackers to read restricted files during development.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"Vite (French word for \"quick\", pronounced /vit/, like \"veet\") is a frontend build tooling to improve the frontend development experience.`server.fs.deny` does not deny requests for patterns with directories. This vulnerability has been patched in version(s) 5.2.6, 5.1.7, 5.0.13, 4.5.3, 3.2.10 and 2.9.18.","ecosystems":["npm"],"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":"Vite's `server.fs.deny` did not deny requests for patterns with directories","id":"CVE-2024-31207","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":12,"n_references":7,"next":{"headline":"Synapse's V2 state resolution weakness allows DoS from remote room members","id":"CVE-2024-31208"},"packages":[{"ecosystem":"npm","fixed":["2.9.18"],"introduced":["2.7.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["2.9.18"],"introduced":["2.7.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["3.2.10"],"introduced":["3.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["3.2.10"],"introduced":["3.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["4.5.3"],"introduced":["4.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["4.5.3"],"introduced":["4.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.0.13"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.0.13"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.1.7"],"introduced":["5.1.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.1.7"],"introduced":["5.1.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.2.6"],"introduced":["5.2.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-8jhw-289h-jh2g"},{"ecosystem":"npm","fixed":["5.2.6"],"introduced":["5.2.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-8jhw-289h-jh2g"}],"prev":{"headline":"Use of Unencrypted HTTP Request in dectalk-tts","id":"CVE-2024-31206"},"products":["vite"],"published":"2024-04-04","related":[],"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":"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":"2024-08-02","vendors":["vitejs"]},"summary":"Vite's file system deny list fails to block directory patterns, allowing attackers to read restricted files during development.","url":"https://insights.sbomify.com/CVE-2024-31207/"}