{"answers":{"affected":"12 open source packages ship an affected version, including vite.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45811 exists.","fix":"Upgrade vite to a fixed version for your release line: 3.2.11, 4.5.4, 5.1.8 or 5.2.14.","what":"CVE-2024-45811 is a medium-severity path traversal vulnerability in vitejs vite, published on 17 Sep 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-45811 and fix it if it is affected.\n\nWhat it is: CVE-2024-45811 is a medium-severity path traversal vulnerability in vitejs vite, published on 17 Sep 2024. It can only be exploited from the same machine or local network, 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-45811 exists.\n\nAffected packages and fixed versions:\n- vite (npm): affected all versions; fixed in 3.2.11\n- vite (npm): affected all versions; fixed in 3.2.11\n- vite (npm): affected from 4.0.0; fixed in 4.5.4\n- vite (npm): affected from 4.0.0; fixed in 4.5.4\n- vite (npm): affected from 5.0.0; fixed in 5.1.8\n- vite (npm): affected from 5.0.0; fixed in 5.1.8\n- vite (npm): affected from 5.2.0; fixed in 5.2.14\n- vite (npm): affected from 5.2.0; fixed in 5.2.14\n- vite (npm): affected from 5.3.0; fixed in 5.3.6\n- vite (npm): affected from 5.3.0; fixed in 5.3.6\n- vite (npm): affected from 5.4.0; fixed in 5.4.6\n- vite (npm): affected from 5.4.0; fixed in 5.4.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-45811/ (Markdown: https://insights.sbomify.com/CVE-2024-45811/index.md)","id":"CVE-2024-45811","markdown":"https://insights.sbomify.com/CVE-2024-45811/index.md","name":"CVE-2024-45811","record":{"aliases":["GHSA-9cwx-2883-4wfx","MINI-vr88-xv87-mjx9"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Vite build tool","requires_auth":"none","summary":"Attackers can bypass file access restrictions in Vite to read arbitrary files from the server by appending specific query parameters.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":4.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:R/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 a frontend build tooling framework for javascript. In affected versions the contents of arbitrary files can be returned to the browser. `@fs` denies access to files outside of Vite serving allow list. Adding `?import\u0026raw` to the URL bypasses this limitation and returns the file content if it exists. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"server.fs.deny bypassed when using ?import\u0026raw in vite","id":"CVE-2024-45811","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":12,"n_references":2,"next":{"headline":"DOM Clobbering gadget found in vite bundled scripts that leads to XSS in Vite","id":"CVE-2024-45812"},"packages":[{"ecosystem":"npm","fixed":["3.2.11"],"introduced":["0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["3.2.11"],"introduced":["0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["4.5.4"],"introduced":["4.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["4.5.4"],"introduced":["4.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.1.8"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.1.8"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.2.14"],"introduced":["5.2.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.2.14"],"introduced":["5.2.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.3.6"],"introduced":["5.3.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.3.6"],"introduced":["5.3.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.4.6"],"introduced":["5.4.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-9cwx-2883-4wfx"},{"ecosystem":"npm","fixed":["5.4.6"],"introduced":["5.4.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-9cwx-2883-4wfx"}],"prev":{"headline":"Envoy crashes for LocalReply in http async client","id":"CVE-2024-45810"},"products":["vite"],"published":"2024-09-17","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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-09-18","vendors":["vitejs"]},"summary":"Attackers can bypass file access restrictions in Vite to read arbitrary files from the server by appending specific query parameters.","url":"https://insights.sbomify.com/CVE-2024-45811/"}