CVE-2023-34092

CVE-2023-34092 is a high-severity security vulnerability in vite (npm), affecting versions < 2.9.16. It is fixed in 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, 4.3.9.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)

The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.

Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your vite.config.js file, review and update the server configuration options to restrict access to unauthorized requests or directories.

Impact

Only users explicitly exposing the Vite dev server to the network (using --host or the server.host config option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.

Details

Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g: //.env, //.env.local)\n4. The server option fs.deny was successfully bypassed.

Proof Images: \n

CVE-2023-34092 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, 4.3.9); upgrading removes the vulnerable code path.

Affected versions

vite (< 2.9.16) vite (>= 3.0.2, < 3.2.7) vite (>= 4.0.0, < 4.0.5) vite (>= 4.1.0, < 4.1.5) vite (>= 4.2.0, < 4.2.3) vite (>= 4.3.0, < 4.3.9)

Security releases

vite → 2.9.16 (npm) vite → 3.2.7 (npm) vite → 4.0.5 (npm) vite → 4.1.5 (npm) vite → 4.2.3 (npm) vite → 4.3.9 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

vite to 2.9.16 or later; vite to 3.2.7 or later; vite to 4.0.5 or later; vite to 4.1.5 or later; vite to 4.2.3 or later; vite to 4.3.9 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2023-34092? CVE-2023-34092 is a high-severity security vulnerability in vite (npm), affecting versions < 2.9.16. It is fixed in 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, 4.3.9.
  2. How severe is CVE-2023-34092? CVE-2023-34092 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of vite are affected by CVE-2023-34092? vite (npm) versions < 2.9.16 is affected.
  4. Is there a fix for CVE-2023-34092? Yes. CVE-2023-34092 is fixed in 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, 4.3.9. Upgrade to this version or later.
  5. Is CVE-2023-34092 exploitable, and should I be worried? Whether CVE-2023-34092 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2023-34092 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2023-34092?
    • Upgrade vite to 2.9.16 or later
    • Upgrade vite to 3.2.7 or later
    • Upgrade vite to 4.0.5 or later
    • Upgrade vite to 4.1.5 or later
    • Upgrade vite to 4.2.3 or later
    • Upgrade vite to 4.3.9 or later

Other vulnerabilities in vite

Stop the waste.
Protect your environment with Kodem.