Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/vite@4.0.2
purl pkg:npm/vite@4.0.2
Next non-vulnerable version 6.4.2
Latest non-vulnerable version 8.0.5
Risk
Vulnerabilities affecting this package (14)
Vulnerability Summary Fixed by
VCID-6cep-dhsy-qkhg
Aliases:
CVE-2024-45812
GHSA-64vr-g452-qvp3
Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS We discovered a DOM Clobbering vulnerability in Vite when building scripts to `cjs`/`iife`/`umd` output format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present. Note that, we have identified similar security issues in Webpack: https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986
4.5.4
Affected by 0 other vulnerabilities.
4.5.5
Affected by 9 other vulnerabilities.
5.1.8
Affected by 9 other vulnerabilities.
5.2.0-beta.0
Affected by 9 other vulnerabilities.
5.2.14
Affected by 9 other vulnerabilities.
5.3.6
Affected by 9 other vulnerabilities.
5.4.6
Affected by 9 other vulnerabilities.
VCID-b2m1-kmdu-ykgt
Aliases:
CVE-2025-58752
GHSA-jqfw-vq24-v9c3
Vite's `server.fs` settings were not applied to HTML files Any HTML files on the machine were served regardless of the `server.fs` settings.
5.4.20
Affected by 2 other vulnerabilities.
6.3.6
Affected by 2 other vulnerabilities.
7.0.7
Affected by 3 other vulnerabilities.
7.1.5
Affected by 3 other vulnerabilities.
VCID-ccy3-s9ra-uub9
Aliases:
CVE-2024-45811
GHSA-9cwx-2883-4wfx
Vite's `server.fs.deny` is bypassed when using `?import&raw` The contents of arbitrary files can be returned to the browser.
4.5.4
Affected by 0 other vulnerabilities.
4.5.5
Affected by 9 other vulnerabilities.
5.1.8
Affected by 9 other vulnerabilities.
5.2.0-beta.0
Affected by 9 other vulnerabilities.
5.2.14
Affected by 9 other vulnerabilities.
5.3.6
Affected by 9 other vulnerabilities.
5.4.6
Affected by 9 other vulnerabilities.
VCID-cwjw-gp95-5uad
Aliases:
CVE-2025-31125
GHSA-4r4m-qw57-chr8
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query The contents of arbitrary files can be returned to the browser.
4.5.11
Affected by 6 other vulnerabilities.
5.0.0-beta.0
Affected by 3 other vulnerabilities.
5.4.16
Affected by 6 other vulnerabilities.
6.0.0-alpha.0
Affected by 1 other vulnerability.
6.0.13
Affected by 7 other vulnerabilities.
6.1.0-beta.0
Affected by 5 other vulnerabilities.
6.1.3
Affected by 7 other vulnerabilities.
6.2.0-beta.0
Affected by 4 other vulnerabilities.
6.2.4
Affected by 7 other vulnerabilities.
6.3.0-beta.0
Affected by 4 other vulnerabilities.
VCID-gdv1-n78f-tud7
Aliases:
CVE-2025-24010
GHSA-vg6x-rcgg-rjx6
Websites were able to send any requests to the development server and read the response in vite Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections. > [!WARNING] > This vulnerability even applies to users that only run the Vite dev server on the local machine and does not expose the dev server to the network.
4.5.6
Affected by 8 other vulnerabilities.
5.4.12
Affected by 8 other vulnerabilities.
6.0.9
Affected by 9 other vulnerabilities.
VCID-gefx-xng3-k3f4
Aliases:
CVE-2025-58751
GHSA-g4jq-h2w9-997c
Vite middleware may serve files starting with the same name with the public directory Files starting with the same name with the public directory were served bypassing the `server.fs` settings.
5.4.20
Affected by 2 other vulnerabilities.
6.3.6
Affected by 2 other vulnerabilities.
7.0.7
Affected by 3 other vulnerabilities.
7.1.5
Affected by 3 other vulnerabilities.
VCID-jxyb-k93s-g3e8
Aliases:
CVE-2025-30208
GHSA-x574-m823-4x7w
Vite bypasses server.fs.deny when using ?raw?? The contents of arbitrary files can be returned to the browser.
4.5.10
Affected by 7 other vulnerabilities.
5.4.15
Affected by 7 other vulnerabilities.
6.0.12
Affected by 8 other vulnerabilities.
6.1.2
Affected by 8 other vulnerabilities.
6.2.3
Affected by 8 other vulnerabilities.
VCID-mbnq-b7vj-jyhb
Aliases:
CVE-2024-23331
GHSA-c24v-8rfc-w8vw
Improper Access Control Vite is a frontend tooling framework for javascript. The Vite dev server option `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows. This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems. Since `picomatch` defaults to case-sensitive glob matching, but the file server does not discriminate; a block list bypass is possible. By requesting raw filesystem paths using augmented casing, the matcher derived from `config.server.fs.deny` fails to block access to sensitive files. This issue has been addressed in vite@5.0.12, vite@4.5.2, vite@3.2.8, and vite@2.9.17. Users are advised to upgrade. Users unable to upgrade should restrict access to dev servers.
4.5.2
Affected by 12 other vulnerabilities.
5.0.0-beta.0
Affected by 3 other vulnerabilities.
5.0.12
Affected by 12 other vulnerabilities.
5.1.0-beta.0
Affected by 11 other vulnerabilities.
VCID-n143-1uka-s3eg
Aliases:
CVE-2023-34092
GHSA-353f-5xf4-qw67
Use of Incorrectly-Resolved Name or Reference 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.
4.0.5
Affected by 13 other vulnerabilities.
4.1.5
Affected by 13 other vulnerabilities.
4.2.3
Affected by 13 other vulnerabilities.
4.3.9
Affected by 13 other vulnerabilities.
VCID-na8b-yqpp-p7fj
Aliases:
CVE-2025-46565
GHSA-859w-5945-r5v3
Duplicate This advisory duplicates another.
4.5.14
Affected by 3 other vulnerabilities.
5.0.0-beta.0
Affected by 3 other vulnerabilities.
5.4.19
Affected by 3 other vulnerabilities.
6.0.0-alpha.0
Affected by 1 other vulnerability.
6.1.6
Affected by 4 other vulnerabilities.
6.2.0-beta.0
Affected by 4 other vulnerabilities.
6.2.7
Affected by 4 other vulnerabilities.
6.3.0-beta.0
Affected by 4 other vulnerabilities.
6.3.4
Affected by 4 other vulnerabilities.
VCID-q59b-2z2s-mfbt
Aliases:
CVE-2025-31486
GHSA-xcj6-pq6g-qj4x
Vite allows server.fs.deny to be bypassed with .svg or relative paths The contents of arbitrary files can be returned to the browser.
4.5.12
Affected by 5 other vulnerabilities.
5.4.17
Affected by 5 other vulnerabilities.
6.0.14
Affected by 6 other vulnerabilities.
6.1.4
Affected by 6 other vulnerabilities.
6.2.5
Affected by 6 other vulnerabilities.
VCID-t716-h35b-9kf2
Aliases:
CVE-2025-32395
GHSA-356w-63v5-8wf4
Vite has an `server.fs.deny` bypass with an invalid `request-target` The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
4.5.13
Affected by 4 other vulnerabilities.
5.4.18
Affected by 4 other vulnerabilities.
6.0.15
Affected by 5 other vulnerabilities.
6.1.5
Affected by 5 other vulnerabilities.
6.2.6
Affected by 5 other vulnerabilities.
VCID-vyjc-1f5b-p7cs
Aliases:
CVE-2024-31207
GHSA-8jhw-289h-jh2g
Vite's `server.fs.deny` did not deny requests for patterns with directories. [Vite dev server option](https://vitejs.dev/config/server-options.html#server-fs-deny) `server.fs.deny` did not deny requests for patterns with directories. An example of such a pattern is `/foo/**/*`.
4.5.3
Affected by 12 other vulnerabilities.
5.0.13
Affected by 11 other vulnerabilities.
5.1.7
Affected by 11 other vulnerabilities.
5.2.6
Affected by 12 other vulnerabilities.
VCID-zn73-3dmx-vye4
Aliases:
CVE-2026-39365
GHSA-4w7w-66w2-5vf9
vite: Vite: Information disclosure via path traversal in dev server's .map request handling
6.4.2
Affected by 0 other vulnerabilities.
7.0.0-beta.0
Affected by 0 other vulnerabilities.
7.3.2
Affected by 0 other vulnerabilities.
8.0.0-beta.0
Affected by 0 other vulnerabilities.
8.0.5
Affected by 0 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-06T07:47:23.792681+00:00 GitLab Importer Affected by VCID-zn73-3dmx-vye4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2026-39365.yml 38.6.0
2026-06-06T06:05:31.711289+00:00 GitLab Importer Affected by VCID-b2m1-kmdu-ykgt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-58752.yml 38.6.0
2026-06-06T06:05:22.191350+00:00 GitLab Importer Affected by VCID-gefx-xng3-k3f4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-58751.yml 38.6.0
2026-06-06T05:48:48.664985+00:00 GitLab Importer Affected by VCID-na8b-yqpp-p7fj https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-46565.yml 38.6.0
2026-06-06T05:46:50.819568+00:00 GitLab Importer Affected by VCID-t716-h35b-9kf2 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-32395.yml 38.6.0
2026-06-06T05:46:02.942539+00:00 GitLab Importer Affected by VCID-q59b-2z2s-mfbt https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-31486.yml 38.6.0
2026-06-06T05:45:15.044372+00:00 GitLab Importer Affected by VCID-cwjw-gp95-5uad https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-31125.yml 38.6.0
2026-06-06T05:44:45.135039+00:00 GitLab Importer Affected by VCID-jxyb-k93s-g3e8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-30208.yml 38.6.0
2026-06-06T05:36:59.010611+00:00 GitLab Importer Affected by VCID-gdv1-n78f-tud7 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2025-24010.yml 38.6.0
2026-06-06T05:23:12.012694+00:00 GitLab Importer Affected by VCID-6cep-dhsy-qkhg https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2024-45812.yml 38.6.0
2026-06-06T05:23:05.449828+00:00 GitLab Importer Affected by VCID-ccy3-s9ra-uub9 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2024-45811.yml 38.6.0
2026-06-06T04:47:52.970652+00:00 GitLab Importer Affected by VCID-vyjc-1f5b-p7cs https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/GHSA-8jhw-289h-jh2g.yml 38.6.0
2026-06-06T04:31:25.843693+00:00 GitLab Importer Affected by VCID-mbnq-b7vj-jyhb https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2024-23331.yml 38.6.0
2026-06-06T03:47:52.897940+00:00 GitLab Importer Affected by VCID-n143-1uka-s3eg https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vite/CVE-2023-34092.yml 38.6.0