{"id":"CVE-2024-45811","published":"2024-09-17T20:08:11Z","modified":"2024-09-18T14:06:21Z","title":"server.fs.deny bypassed when using ?import&raw in vite","vendor":"vitejs","product":"vite","tier":"core","eol":null,"affectedVersions":[{"vendor":"vitejs","product":"vite","versions":[">= 5.4.0, < 5.4.6",">= 5.3.0, < 5.3.6",">= 5.0.0, < 5.2.14",">= 4.0.0, < 4.5.5","< 3.2.11"]}],"description":{"text":"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&raw` 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.","provenance":"source","from":"CVE.org"},"summary":null,"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01096,"percentile":0.65539,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-09-11","exploitedFirstSeen":"2026-09-11","ransomware":false,"evidence":[{"url":"https://www.f5.com/labs/articles/cloud-takeover-mass-scanning-for-exposed-vite-endpoints-cve-2026-39364","date":"2026-09-11"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":4,"pulses":[{"name":"Exposed Vite Development Servers Targeted for AWS and Azure Credential Theft","url":"https://otx.alienvault.com/pulse/6aabdf602847b323f935580a","created":"2026-09-17"},{"name":"Vite CVE-2026-39364 Mass Scan: Cloud Credential & IaC Theft from Exposed Dev Servers","url":"https://otx.alienvault.com/pulse/6aaa31bc3e91de6c050ac182","created":"2026-09-16"},{"name":"Vite CVE-2026-39364 Mass Scanning for AWS/Azure Secrets","url":"https://otx.alienvault.com/pulse/6aa8e00b9ed2e3fb07d8e04e","created":"2026-09-15"},{"name":"Hackers target exposed Vite dev servers to steal AWS, Azure secrets","url":"https://otx.alienvault.com/pulse/6aa827098a5afc79562c13c8","created":"2026-09-14"}],"provenance":"machine"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-284","name":"Improper Access Control"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.4.0, <5.4.6",">=5.3.0, <5.3.6",">=5.2.0, <5.2.14",">=4.0.0, <4.5.4","<3.2.11",">=5.0.0, <5.1.8"],"patched":["5.4.6","5.3.6","5.2.14","4.5.4","3.2.11","5.1.8"],"from":["GHSA-9cwx-2883-4wfx"],"provenance":"source"}],"advisories":[{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.4.0, <5.4.6"],"patched":["5.4.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.3.0, <5.3.6"],"patched":["5.3.6"],"provenance":"source","from":"GHSA"},{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.2.0, <5.2.14"],"patched":["5.2.14"],"provenance":"source","from":"GHSA"},{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=4.0.0, <4.5.4"],"patched":["4.5.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":["<3.2.11"],"patched":["3.2.11"],"provenance":"source","from":"GHSA"},{"id":"GHSA-9cwx-2883-4wfx","url":"https://github.com/advisories/GHSA-9cwx-2883-4wfx","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.0.0, <5.1.8"],"patched":["5.1.8"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2024-2759","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-2759","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2024-09-17","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2024-45811","provenance":"source"},{"date":"2026-09-11","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.f5.com/labs/articles/cloud-takeover-mass-scanning-for-exposed-vite-endpoints-cve-2026-39364","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":63.1,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":10.0,"detail":"added 50 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":13.11,"detail":"percentile 0.6554"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":1.59,"detail":"4 pulses"},{"name":"CVSS severity","points":3.36,"detail":"base score 4.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2024-31207","to":"CVE-2024-45811","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"3.2.10","toFixed":"3.2.11","daysApart":166},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"4.5.3","toFixed":"4.5.4","daysApart":166},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48","https://github.com/vitejs/vite/commit/011bbca350e447d1b499d242804ce62738c12bc0","https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249"],"basis":"shared function","functions":["isFileServingAllowed"]}]}],"children":[{"from":"CVE-2024-45811","to":"CVE-2025-30208","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/315695e9d97cc6cfa7e6d9e0229fb50cdae3d9f4","https://github.com/vitejs/vite/commit/80381c38d6f068b12e6e928cd3c616bd1d64803c"],"basis":"shared function","functions":["transformMiddleware"]},{"kind":"similar","provenance":"machine","score":0.55,"basis":"same product + CWE + description similarity"}]},{"from":"CVE-2024-45811","to":"CVE-2025-31125","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949"],"basis":"shared function","functions":["transformMiddleware"]}]},{"from":"CVE-2024-45811","to":"CVE-2026-39364","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff"],"basis":"shared function","functions":["transformMiddleware"]}]},{"from":"CVE-2024-45811","to":"CVE-2026-39365","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/79f002f2286c03c88c7b74c511c7f9fc6dc46694"],"basis":"shared function","functions":["transformMiddleware"]}]}],"packageHistory":[{"cve":"CVE-2023-49293","published":"2023-12-04","fixed":"5.0.5","kev":false},{"cve":"CVE-2024-23331","published":"2024-01-19","fixed":"5.0.12","kev":false},{"cve":"CVE-2024-31207","published":"2024-04-04","fixed":"5.2.6","kev":false},{"cve":"CVE-2024-45811","published":"2024-09-17","fixed":"5.4.6","kev":false},{"cve":"CVE-2024-45812","published":"2024-09-17","fixed":"5.4.6","kev":false},{"cve":"CVE-2024-52011","published":"2026-06-01","fixed":"5.4.9","kev":false},{"cve":"CVE-2025-24010","published":"2025-01-20","fixed":"6.0.9","kev":false}],"package":"npm:vite"}}