Vulnerability · Published Jun 1, 2023 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity information exposure in vite from vitejs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.2% (higher than 88% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)3.2%top 12.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Nuclei

Official description

Vite provides frontend tooling. Prior to versions 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, and 4.3.9, Vite Server Options (`server.fs.deny`) can be bypassed using double forward-slash (//) allows any unauthenticated user to read file from the Vite root-path of the application including the default `fs.deny` settings (`['.env', '.env.*', '*.{crt,pem}']`). Only users explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected, and only files in the immediate Vite project root folder could be exposed. This issue is fixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5, vite@3.2.7, and vite@2.9.16.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmvite2.9.16GHSA-353f-5xf4-qw67
npmvite3.2.7GHSA-353f-5xf4-qw67
npmvite4.0.5GHSA-353f-5xf4-qw67
npmvite4.1.5GHSA-353f-5xf4-qw67
npmvite4.2.3GHSA-353f-5xf4-qw67
npmvite4.3.9GHSA-353f-5xf4-qw67

Affected products (as reported)

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

Weakness: CWE-50, CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References