Cross-site Scripting (XSS)org.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the getHtmlFilename function in packages/vite/src/node/server/middlewares/indexHtml.ts, where query strings are not stripped from the URL before the filename is constructed and passed to transformIndexHtml. An attacker who can influence the URL of an HTML request can supply a URL containing query parameters or a protocol-relative path (starting with //), causing the filename passed to transform hooks to be incorrect and potentially allowing unintended resource resolution or URL manipulation in generated script and link tags.
How to fix Cross-site Scripting (XSS)? Upgrade org.mvnpm:vite to version 8.3.3 or higher.
| |
Directory Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Directory Traversal via the importAnalysisPlugin in packages/vite/src/node/plugins/importAnalysis.ts, where resolved module IDs are registered into safeModulePaths using the URL form (via fsPathFromUrl(stripBase(url, base))) rather than the cleaned filesystem path. A Vite plugin can return a resolveId result whose path, when processed through URL-to-path conversion, maps to a file outside the intended safe module set, causing that file to be incorrectly marked as safe and subsequently served via the @fs endpoint to any network requester. This allows an attacker to read files that should be blocked by the filesystem access restrictions.
How to fix Directory Traversal? Upgrade org.mvnpm:vite to version 8.3.3 or higher.
| |
Command Injectionorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Command Injection via constructWindowsLaunchCommand in packages/launch-editor/construct-windows-launch-command.js, where file path arguments containing % characters are passed unsanitized to childProcess.exec on Windows. CMD expands percent-delimited expressions such as %VAR:old=new% before consuming caret escapes, allowing an attacker who controls the file path argument to inject arbitrary OS commands through environment variable expansion. Arguments containing line breaks are similarly not rejected, as CMD treats line breaks as command separators.
Note: This is only exploitable on Windows platforms.
How to fix Command Injection? Upgrade org.mvnpm:vite to version 8.3.3 or higher.
| |
Arbitrary Command Injectionorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Arbitrary Command Injection via the parseFile function in packages/launch-editor/index.js, which previously resolved file paths only after stripping position suffixes without calling path.resolve before security checks. An attacker who can influence the file argument passed to launchEditor can supply a path that bypasses the UNC path check on Windows (which compared the raw, unresolved string against \\\\) and cause the editor to open an arbitrary file on the host system, achieving unauthorized read and write access to sensitive files.
How to fix Arbitrary Command Injection? Upgrade org.mvnpm:vite to version 8.3.3 or higher.
| |
Arbitrary Argument Injectionorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Arbitrary Argument Injection via the getArgumentsForFile function in packages/launch-editor/get-args.js, where a filename is passed directly to an editor process without being resolved to an absolute path first. An attacker who can control the filename argument can supply a value beginning with a hyphen or flag-like prefix, causing it to be interpreted as a command-line flag by the spawned editor process rather than as a file path.
Note: This is only exploitable on WSL (Windows Subsystem for Linux) environments where Vite 2.0.0+ is used with launch-editor-middleware v2.2.0+, and the impact on Notepad++ is limited to configurations using a plugin that exposes dangerous operations via plugin messages.
How to fix Arbitrary Argument Injection? Upgrade org.mvnpm:vite to version 8.3.3 or higher.
| |
Directory Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Directory Traversal due to improper checks for file system paths on Windows platforms in isFileLoadingAllowed() function. An attacker can obtain sensitive file contents by bypassing path restrictions using NTFS alternate data streams or 8.3 short name compatibility features. This is only exploitable if the development server is explicitly exposed to the network, the sensitive file exists in the allowed directories, and the server is running on Windows with the file located on an NTFS volume or a volume with 8.3 short name generation enabled.
How to fix Directory Traversal? Upgrade org.mvnpm:vite to version 6.4.3, 7.3.5, 8.0.16 or higher.
| [,6.4.3)[7.0.0,7.3.5)[8.0.0,8.0.16) |
Missing Authentication for Critical Functionorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Missing Authentication for Critical Function via the fetchModule method exposed through the WebSocket interface when the server is explicitly exposed to the network and WebSocket is enabled. An attacker can access arbitrary files on the server by connecting to the WebSocket without an Origin header and invoking fetchModule with a crafted file URL, thereby retrieving sensitive file contents as JavaScript modules.
Note:
This is only exploitable if the development server is started with network exposure (such as using --host or the server.host configuration) and WebSocket is not disabled.
How to fix Missing Authentication for Critical Function? Upgrade org.mvnpm:vite to version 6.4.2, 7.3.2, 8.0.5 or higher.
| [6.1.0,6.4.2)[7.0.0,7.3.2)[8.0.0,8.0.5) |
Directory Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Directory Traversal via the handling of .map files in the dev server when resolving file paths. An attacker can access sensitive files outside the project root by injecting ../ segments into the URL, provided the files are valid source map JSON and the server is explicitly exposed to the network with predictable .map file paths.
Note:
This is only exploitable if the dev server is started with the --host flag or the server.host configuration option, and sensitive content exists in predictable .map files.
How to fix Directory Traversal? Upgrade org.mvnpm:vite to version 6.4.2, 7.3.2, 8.0.5 or higher.
| [,6.4.2)[7.0.1,7.3.2)[8.0.1,8.0.5) |
Directory Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Directory Traversal via the server.fs.deny function. An attacker can access restricted files by appending a backslash to the URL when the development server is running on Windows and is explicitly exposed to the network.
Note:
This is only exploitable if the server is explicitly exposed to the network using the command line parameter --host or the config option server.host.
How to fix Directory Traversal? Upgrade org.mvnpm:vite to version 5.4.21, 6.4.1, 7.1.11 or higher.
| [,5.4.21)[6.1.0,6.4.1)[7.0.0,7.1.11) |
Relative Path Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Relative Path Traversal via improper enforcement of server.fs settings. An attacker can access arbitrary HTML files on the server by sending crafted requests to the preview server.
Note:
This is only exploitable if the server is explicitly exposed to the network using the --host flag or the server.host configuration option, and the application uses appType set to 'spa' (default) or 'mpa'.
How to fix Relative Path Traversal? Upgrade org.mvnpm:vite to version 5.4.21, 6.4.1, 7.1.5 or higher.
| [,5.4.21)[6.1.0,6.4.1)[7.0.0,7.1.5) |
Directory Traversalorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Directory Traversal through the server.fs.deny configuration due to improper input sanitization. An attacker can bypass server.fs.deny with /. for files under project root and access sensitive files by manipulating path traversal sequences.
Note:
This is only exploitable if the application is explicitly exposing the Vite dev server to the network (using --host or server.host config option). Only files that are under project root and are denied by a file matching pattern can be bypassed.
How to fix Directory Traversal? Upgrade org.mvnpm:vite to version 5.4.21, 6.3.4 or higher.
| |
Information Exposureorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Information Exposure due to the handling of req.url which may contain unexpected characters such as #. An attacker can access and retrieve the contents of arbitrary files by sending specially crafted requests that bypass the server.fs.deny checks.
Note:
This is only exploitable if the Vite dev server is explicitly exposed to the network and running on Node or Bun runtimes, excluding Deno.
How to fix Information Exposure? Upgrade org.mvnpm:vite to version 5.4.21, 6.2.6 or higher.
| |
Incorrect Authorizationorg.mvnpm:vite is a Native-ESM powered web dev build tool
Affected versions of this package are vulnerable to Incorrect Authorization via the bypass of the server.fs.deny restriction. An attacker can access restricted files by appending ?.svg with ?.wasm?init or with sec-fetch-dest: script header to the requests.
Note:
This is only exploitable if the file is smaller than the build.assetsInlineLimit (default: 4kB), when using Vite 6.0+ and when the Vite dev server is explicitly exposed to the network (using --host or server.host config option.
How to fix Incorrect Authorization? Upgrade org.mvnpm:vite to version 5.4.21, 6.2.5 or higher.
| |