{"id":"CVE-2025-58751","state":"PUBLISHED","title":"Vite middleware may serve files starting with the same name with the public directory","description":"Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.","publishedAt":"2025-09-08T22:52:45.667Z","updatedAt":"2025-09-09T13:29:36.802Z","severity":{"score":2.3,"label":"Low","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["vitejs vite"],"affected":[{"vendor":"vitejs","product":"vite","versions":[{"version":"< 5.4.20","status":"affected"},{"version":">= 6.0.0, < 6.3.6","status":"affected"},{"version":">= 7.0.0, < 7.0.7","status":"affected"},{"version":">= 7.1.0, < 7.1.5","status":"affected"}]}],"references":["https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c","https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb","https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d","https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069","https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec","https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0"],"weaknesses":["CWE-22","CWE-200","CWE-284"],"ingestedAt":"2026-10-29T20:09:39.787Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/58xxx/CVE-2025-58751.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2025-58751","state":"PUBLISHED","datePublished":"2025-09-08T22:52:45.667Z","dateUpdated":"2025-09-09T13:29:36.802Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2025-09-04T19:18:09.499Z"},"containers":{"cna":{"title":"Vite middleware may serve files starting with the same name with the public directory","descriptions":[{"lang":"en","value":"Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue."}],"affected":[{"vendor":"vitejs","product":"vite","versions":[{"version":"< 5.4.20","status":"affected"},{"version":">= 6.0.0, < 6.3.6","status":"affected"},{"version":">= 7.0.0, < 7.0.7","status":"affected"},{"version":">= 7.1.0, < 7.1.5","status":"affected"}]}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c","name":"https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb","name":"https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d","name":"https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069","name":"https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec","name":"https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0","name":"https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":2.3,"baseSeverity":"LOW","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-200","lang":"en","description":"CWE-200: Exposure of Sensitive Information to an Unauthorized Actor","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-284","lang":"en","description":"CWE-284: Improper Access Control","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2025-09-08T22:52:45.667Z"},"source":{"advisory":"GHSA-g4jq-h2w9-997c","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-09-09T13:14:11.634879Z","id":"CVE-2025-58751","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-09-09T13:29:36.802Z"}}]}}}