Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine
### Summary 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 `/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 `/etc/hosts` could make Vite return the host's `/etc/hosts` file. ### Impact Only apps that meet all of the following conditions are affected: - explicitly expose the Vite dev server to the network (using `--host` or the [`server.host` option](https://vite.dev/config/server-options#server-host)) - contain an imported file whose root-relative browser URL is also the absolute path of a readable file on the host - The sensitive file is not matched by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) - the dev server is not running on Windows ### Details When Vite analyzes an in-root import, it rewrites the resolved module ID to a browser URL such as `/etc/hostname`. In affected versions, Vite converts that URL with `fsPathFromUrl` and adds the result to `safeModulePaths`. Because `fsPathFromUrl` ensures a leading slash without resolving the URL against the project root, the project URL `/etc/hostname` is recorded as if it were the absolute filesystem path `/etc/hostname`. For a later reques
- Products
- vite, vite-plus
- Affected versions
- Not specified
- Fixed versions
- 1.1.0, 6.4.4, 7.3.7, 8.1.6, 8.2.4, 8.3.3
- CVEs
- CVE-2026-112946
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 14:34 UTC · Revision 1
Source evidence
Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine
core-osv · Original sourcePublished 21 Oct 2026, 16:47 UTC
### Summary 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 `/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 `/etc/hosts` could make Vite return the host's `/etc/hosts` file. ### Impact Only apps that meet all of the following conditions are affected: - explicitly expose the Vite dev server to the network (using `--host` or the [`server.host` option](https://vite.dev/config/server-options#server-host)) - contain an imported file whose root-relative browser URL is also the absolute path of a readable file on the host - The sensitive file is not matched by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) - the dev server is not running on Windows ### Details When Vite analyzes an in-root import, it rewrites the resolved module ID to a browser URL such as `/etc/hostname`. In affected versions, Vite converts that URL with `fsPathFromUrl` and adds the result to `safeModulePaths`. Because `fsPathFromUrl` ensures a leading slash without resolving the URL against the project root, the project URL `/etc/hostname` is recorded as if it were the absolute filesystem path `/etc/hostname`. For a later reques
osv:GHSA-rq7h-c2jc-7f22
vite
Fixed versions: 8.3.3
vite
Fixed versions: 8.2.4
vite
Fixed versions: 8.1.6
vite
Fixed versions: 7.3.7
vite
Fixed versions: 6.4.4
vite-plus
Fixed versions: 1.1.0
Complete source record
{
"id": "95fc084f9458a82932c096835bb38fb44ebbedd7ad925c0fe965a258713fabad",
"url": "https://osv.dev/vulnerability/GHSA-rq7h-c2jc-7f22",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine",
"summary": "### Summary 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 `/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 `/etc/hosts` could make Vite return the host's `/etc/hosts` file. ### Impact Only apps that meet all of the following conditions are affected: - explicitly expose the Vite dev server to the network (using `--host` or the [`server.host` option](https://vite.dev/config/server-options#server-host)) - contain an imported file whose root-relative browser URL is also the absolute path of a readable file on the host - The sensitive file is not matched by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) - the dev server is not running on Windows ### Details When Vite analyzes an in-root import, it rewrites the resolved module ID to a browser URL such as `/etc/hostname`. In affected versions, Vite converts that URL with `fsPathFromUrl` and adds the result to `safeModulePaths`. Because `fsPathFromUrl` ensures a leading slash without resolving the URL against the project root, the project URL `/etc/hostname` is recorded as if it were the absolute filesystem path `/etc/hostname`. For a later reques",
"evidence": "osv:GHSA-rq7h-c2jc-7f22",
"products": [
{
"name": {
"value": "vite",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.3.3",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "vite",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.2.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "vite",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.1.6",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "vite",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "7.3.7",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "vite",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.4.4",
"evidence": "/affected/4/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "vite-plus",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.1.0",
"evidence": "/affected/5/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "GHSA-rq7h-c2jc-7f22",
"aliases": [
"CVE-2026-112946",
"GHSA-rq7h-c2jc-7f22"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "8.3.0"
},
{
"fixed": "8.3.3"
}
]
}
],
"package": {
"name": "vite",
"purl": "pkg:npm/vite",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 8.3.2"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "8.2.0"
},
{
"fixed": "8.2.4"
}
]
}
],
"package": {
"name": "vite",
"purl": "pkg:npm/vite",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 8.2.3"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.1.6"
}
]
}
],
"package": {
"name": "vite",
"purl": "pkg:npm/vite",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 8.1.5"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.3.7"
}
]
}
],
"package": {
"name": "vite",
"purl": "pkg:npm/vite",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 7.3.6"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "6.4.4"
}
]
}
],
"package": {
"name": "vite",
"purl": "pkg:npm/vite",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 6.4.3"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.0"
}
]
}
],
"package": {
"name": "vite-plus",
"purl": "pkg:npm/vite-plus",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rq7h-c2jc-7f22/GHSA-rq7h-c2jc-7f22.json",
"last_known_affected_version_range": "<= 1.0.0"
}
}
],
"modified": "2026-10-21T17:00:06.336868869Z",
"provider": "osv",
"references": [
"https://github.com/vitejs/vite/security/advisories/GHSA-rq7h-c2jc-7f22",
"https://nvd.nist.gov/vuln/detail/CVE-2026-112946",
"https://github.com/vitejs/vite/pull/23656",
"https://github.com/vitejs/vite/commit/170b92791421bcd484f7325936d989a82d6bd4aa",
"https://github.com/vitejs/vite/commit/45c0e3392a298626955a0ab93a8e51232daac721",
"https://github.com/vitejs/vite/commit/c3e06f92e969952466b4e2f5801e85e1e00cd905",
"https://github.com/vitejs/vite/commit/e570d8d016096b5f8f6f09808376ca6cf73f27d0",
"https://github.com/vitejs/vite/commit/f0d76c7da13d5e794807b82f0b86c1931a8438e3",
"https://github.com/vitejs/vite"
],
"provider_metadata": {
"cwe_ids": [
"CWE-22",
"CWE-284"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2026-10-20T16:17:05Z",
"github_reviewed_at": "2026-10-21T16:47:42Z"
}
},
"related_cves": [
{
"value": "CVE-2026-112946",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 394544,
"published_at": "2026-10-21T16:47:42+00:00"
}