HIGH · CVSS 3.1 7.0 CWE-78CWE-95

CVE-2026-137190: Vite+: Shell Command Injection via an Unvalidated Registry Version String

Published 2026-12-01 · Updated 2026-12-01 · Also known as GHSA-p79r-mf8q-r78h

Summary

Vite+ contains a shell command injection vulnerability in the 'vp env use' command due to improper sanitization of registry-provided version strings. Users of the vite-plus package should update to version 1.5.1 or later immediately.

Who is affected

The vulnerability allows attackers to execute arbitrary shell commands with the privileges of the developer by providing a malicious version string via a controlled registry configuration. Exploitation requires the victim to have the shell integration enabled and execute 'vp env use' with the '--no-install' flag within a directory containing a malicious '.npmrc' file.

Exploitability

The vulnerability is rated as High with a CVSS 3.1 score of 7.0, indicating it is exploitable locally with high attack complexity and user interaction. No EPSS data is available, and the vulnerability is not currently tracked by the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-12-01. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm vite-plus >= 0.3.3, < 1.5.1 1.5.1 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack vectorLocal
Attack complexityHigh
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

FAQ

What causes the command injection?

The 'vp env use' command constructs shell export statements using version strings returned from the registry without performing any input validation or quoting/escaping for the target shell.

Is this vulnerability actively exploited?

There is no information suggesting active exploitation; the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) database.

Does this affect all shell types?

The vulnerability impacts POSIX, fish, and cmd shells by failing to quote the input, while PowerShell and Nushell are partially affected because they use quotes without properly escaping the injected content.

Original advisory description
## Summary `vp env use` changes the active runtime for the current terminal by printing shell statements that a wrapper in the user's profile evaluates, so anything in that output is shell code. With no project file selecting a version, Vite+ asks the registry for the latest one, the registry comes from an `.npmrc` inside the project directory, and the reply is interpolated into an export statement unquoted and unchecked. A cloned repository can therefore name a server it controls and answer with a version string carrying shell commands, which run in the developer's shell when that command is given the documented `--no-install` flag. ## Details The statement is built by direct interpolation, and the module documents that the wrapper evaluates it: ```rust Shell::Posix => format!("export {variable}={value}"), // vp_global_cli/src/commands/env/use.rs:31 Shell::Fish => format!("set -gx {variable} {value}"), // vp_global_cli/src/commands/env/use.rs:32 ``` No shell arm quotes or escapes the value. The POSIX, fish and cmd arms add no quotes at all, and the PowerShell and Nushell arms wrap it in double quotes without escaping them (`vp_global_cli/src/commands/env/use.rs:31-35`). The value is whatever the registry returned. Vite+ asks for the `latest` dist tag, which is hardcoded rather than typed by the developer, and the reply is passed through unchanged (`vp_global_cli/src/commands/env/package_manager.rs:173` and `vp_pm_cli/src/package_manager.rs:1066-1101`). The only check on the way to the shell inspects the optional integrity suffix, never the version itself (`vp_global_cli/src/commands/env/use.rs:76-93`). The same string is validated everywhere else: the dist-tag cache parses it before reuse, and installation rejects it outright (`vp_pm_cli/src/package_manager.rs:1041` and `:1151`). The gap is confined to the one path that prints shell code. Affected product: Vite+ (VoidZero Inc.), global `vp` command line interface, `env use` Affected versions: 0.3.3 through 1.4.0 inclusive, and main at 4928bc5, confirmed on published 1.4.0 (darwin-arm64 and linux-x64-gnu) ## PoC The documented shell integration is loaded, as the installer instructs. `$REG` answers the dist-tag lookup with the payload version, and the repository ships one `.npmrc` line naming it. ```bash PAYLOAD='1.0.0; echo VP_ENV_USE_INJECTION_CONFIRMED > "$VP_POC_MARKER" #' printf 'registry=%s\n' "$REG" > hostile-repo/.npmrc ( cd hostile-repo && vp env use pnpm --no-install ) cat "$VP_POC_MARKER" ``` ```text Using pnpm v1.0.0; echo VP_ENV_USE_INJECTION_CONFIRMED > "$VP_POC_MARKER" # (resolved from registry fallback) VP_ENV_USE_INJECTION_CONFIRMED ``` Benign controls, one variable each: an ordinary version ran nothing, a repository without that `.npmrc` resolved a genuine version, and the default flow refused the string. ```text error: Install error: Invalid argument: invalid pnpm version "1.0.0; echo ... #": expected a version, range, or dist-tag ``` ## Impact Arbitrary commands run with the developer's permissions in their shell. The attacker reads anything that account can read and writes anything it can write, including shell startup files, and can end the shell. The session itself can be altered too, though the reproduction demonstrates only the file-system effect: its harness pipes the command through a filter, and a pipeline element runs in a subshell. Preconditions: the shell integration and `--no-install`, both documented.

References

Source records: GHSA-p79r-mf8q-r78h (OSV.dev).