CVE-2026-112946: Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine
The content of files outside server.fs setting can be returned to the browser if the project imports a file path concatenated with the root. For example, if the project references <path-to-project-root>/etc/hosts, the content of /etc/hosts was possible to be returned.
The content of files outside the server.fs.allow option can be returned to the browser when a project imports a file whose root-relative path matches an absolute path on the host. For example, referencing <project-root>/etc/hosts could make Vite return the host’s /etc/hosts file.
References
- github.com/advisories/GHSA-rq7h-c2jc-7f22
- github.com/vitejs/vite/commit/170b92791421bcd484f7325936d989a82d6bd4aa
- github.com/vitejs/vite/commit/45c0e3392a298626955a0ab93a8e51232daac721
- github.com/vitejs/vite/commit/c3e06f92e969952466b4e2f5801e85e1e00cd905
- github.com/vitejs/vite/commit/e570d8d016096b5f8f6f09808376ca6cf73f27d0
- github.com/vitejs/vite/commit/f0d76c7da13d5e794807b82f0b86c1931a8438e3
- github.com/vitejs/vite/pull/23656
- github.com/vitejs/vite/security/advisories/GHSA-rq7h-c2jc-7f22
- nvd.nist.gov/vuln/detail/CVE-2026-112946
Code Behaviors & Features
Detect and mitigate CVE-2026-112946 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →