CVE-2026-39364: Vite `server.fs.deny` Bypassed With Queries Vulnerability
HIGHCVE-2026-39364 is a HIGH `server.fs.deny` bypassed with queries vulnerability (CWE-284: Improper Access Control) affecting Vite libraries in the npm ecosystem. The issue involves `server.fs.deny` bypassed with queries. Remediation is available by upgrading affected packages to version 8.0.5, 7.3.2.
CVE-2026-39364 at a Glance
How to Fix CVE-2026-39364
To remediate this vulnerability, upgrade all affected Vite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install vite@8.0.5
npm install vite@7.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vite
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-39364, inspect your project dependencies using npm:
npm ls vite
Analyze the terminal output to locate any version of Vite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.0.5), your application is affected.
Note: The npm ls vite command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Vite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-39364 Affected Vite Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-39364?
Which Vite versions are affected?
What version fixes CVE-2026-39364?
Is vite affected?
What CWE is associated with CVE-2026-39364?
How can I check npm dependencies for CVE-2026-39364?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v2wj-q39q-566r",
"modified" : "2026-04-07T22:16:17Z",
"published" : "2026-04-06T18:03:32Z",
"aliases" : [ "CVE-2026-39364" ],
"summary" : "Vite: `server.fs.deny` bypassed with queries",
"details" : "### Summary\n\nThe contents of files that are specified by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) can be returned to the browser.\n\n### Impact\n\nOnly apps that match the following conditions are affected:\n\n- explicitly exposes the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host))\n- the sensitive file exists in the allowed directories specified by [`server.fs.allow`](https://vite.dev/config/server-options#server-fs-allow)\n- the sensitive file is denied with a pattern that matches a file by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny)\n\n### Details\n\nOn the Vite dev server, files that should be blocked by `server.fs.deny` (e.g., `.env`, `*.crt`) can be retrieved with HTTP 200 responses when query parameters such as `?raw`, `?import&raw`, or `?import&url&inline` are appended.\n\n### PoC\n\n1. Start the dev server: `pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort`\n2. Confirm that `server.fs.deny` is enforced (expect 403): `curl -i http://127.0.0.1:5175/src/.env | head -n 20`\n <img width=\"3944\" height=\"1092\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ecb9f2e0-e08f-4ac7-b194-e0f988c4cd4f\" />\n3. Confirm that the same files can be retrieved with query parameters (expect 200):\n <img width=\"2014\" height=\"373\" alt=\"image\" src=\"https://github.com/user-attachments/assets/76bc2a6a-44f4-4161-ae47-eab5ae0c04a8\" />",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.0.4"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.1.0"
}, {
"fixed" : "7.3.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.3.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39364"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/pull/22160"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vitejs/vite"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/releases/tag/v7.3.2"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/releases/tag/v8.0.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-180", "CWE-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-06T18:03:32Z",
"nvd_published_at" : "2026-04-07T20:16:30Z"
}
}