vite-plus@0.0.2-g5d96ecf4.20260228-1157

The Unified Toolchain for the Web

  • latest version

    1.7.0

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    5 days ago

  • licenses detected

    • >=0.0.0-g61d318d2.20260227-0939 <0.0.1; >=0.0.2-g17a37daf.20260304-1136
  • Direct Vulnerabilities

    Known vulnerabilities in the vite-plus package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • L
    Cross-site Scripting (XSS)

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 1.1.0 or higher.

    <1.1.0
    • M
    Directory Traversal

    vite-plus is a The Unified Toolchain for the Web

    Affected versions of this package are vulnerable to Directory Traversal via the isServerAccessDeniedForTransform function in packages/vite/src/node/server/middlewares/transform.ts, which fails to check the ?vite-wasm-instance query parameter against the fs.serve allowlist. An attacker can append ?vite-wasm-instance to a request URL to bypass filesystem access controls and read files outside the configured allowed directories, including sensitive files such as .env.

    How to fix Directory Traversal?

    Upgrade vite-plus to version 1.1.0 or higher.

    <1.1.0
    • M
    Directory Traversal

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 1.1.0 or higher.

    <1.1.0
    • M
    Command Injection

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 1.1.0 or higher.

    <1.1.0
    • H
    Arbitrary Command Injection

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 1.1.0 or higher.

    <1.1.0
    • M
    Arbitrary Argument Injection

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 1.1.0 or higher.

    <1.1.0
    • H
    Directory Traversal

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 0.1.24 or higher.

    <0.1.24
    • H
    Incorrect Behavior Order: Validate Before Canonicalize

    vite-plus is a The Unified Toolchain for the Web

    Affected versions of this package are vulnerable to Incorrect Behavior Order: Validate Before Canonicalize through the server.fs.deny component. An attacker can access sensitive files by appending specific query parameters such as ?raw, ?import&raw, or ?import&url&inline to HTTP requests.

    Note:

    This is only exploitable if the development server is explicitly exposed to the network, the sensitive file exists within directories allowed by server.fs.allow, and the file is denied by a pattern in server.fs.deny.

    How to fix Incorrect Behavior Order: Validate Before Canonicalize?

    Upgrade vite-plus to version 0.1.16 or higher.

    <0.1.16
    • H
    Missing Authentication for Critical Function

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 0.1.16 or higher.

    <0.1.16
    • M
    Directory Traversal

    vite-plus is a The Unified Toolchain for the Web

    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 vite-plus to version 0.1.16 or higher.

    <0.1.16