CVE-2026-137190: CVE-2026-137190: Shell Command Injection in Vite+ Global CLI via Unvalidated Registry Version String
CVE-2026-137190: Shell Command Injection in Vite+ Global CLI via Unvalidated Registry Version String Vulnerability ID: CVE-2026-137190 CVSS Score: 7.0 Published: 2026-12-01 A local OS command injection and dynamic c
CVE-2026-137190: Shell Command Injection in Vite+ Global CLI via Unvalidated Registry Version String
Vulnerability ID: CVE-2026-137190
CVSS Score: 7.0
Published: 2026-12-01
A local OS command injection and dynamic code evaluation vulnerability (CWE-78 / CWE-95) exists in the Vite+ global command-line interface (vp) across versions 0.3.3 through 1.5.0. When resolving package manager dist-tags such as 'latest' with the '--no-install' flag enabled, Vite+ queries the npm registry defined in the local workspace's '.npmrc' file and returns the raw version string without semantic version validation. Because this unvalidated string is interpolated directly into shell environment export statements evaluated by the user's shell wrapper, an attacker controlling the registry can inject shell metacharacters to achieve arbitrary command execution in the developer's local terminal context.
TL;DR
Vite+ CLI versions 0.3.3 to 1.5.0 fail to validate package manager version strings fetched from dist-tag endpoints when invoked with '--no-install'. An untrusted repository containing a malicious '.npmrc' registry configuration can return shell control characters in the version response, triggering arbitrary OS command execution via the Vite+ shell integration wrapper.
Technical Details
- Vulnerability Class: OS Command Injection (CWE-78) / Eval Injection (CWE-95)
- CVSS v3.1 Score: 7.0 HIGH (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H)
- Attack Vector: Local CLI execution with untrusted .npmrc registry and --no-install flag
- Affected Component: fetch_dist_tag_version() in crates/vp_pm_cli/src/package_manager.rs
- Vulnerable Versions: >= 0.3.3, < 1.5.1
- Patched Version: 1.5.1 (Commit 92edd550cf8d801d040fa3559aae906e8fa42dab)
- Exploit Status: No known public exploits or active exploitation
- CISA KEV Status: Not Listed
Affected Systems
- voidzero-dev/vite-plus (Vite+ / vp global CLI)
- crates/vp_pm_cli
- crates/vp_global_cli
-
vite-plus (vp CLI): >= 0.3.3, < 1.5.1 (Fixed in:
1.5.1)
Code Analysis
Commit: 92edd55
fix(pm): require a dist-tag version to be valid semver (#3395)
File: crates/vp_pm_cli/src/package_manager.rs
@@ -1066,7 +1066,22 @@ async fn fetch_dist_tag_version(
let client = HttpClient::with_npm_config(3, 500, npm_config.clone());
for url in urls {
match client.get_json::<PackageJson>(url).await {
- Ok(package_json) => return Ok(package_json.version),
+ Ok(package_json) => {
+ let version = package_json.version;
+ if Version::parse(&version).is_err() {
+ return Err(Error::InvalidArgument(
+ format!(
+ "registry returned an invalid {package_manager_type} version {version:?} for dist-tag {tag:?}"
+ )
+ .into(),
+ ));
+ }
+ return Ok(version);
+ }
Err(error) if is_not_found(&error) => {}
Err(error) => return Err(error),
}
Mitigation Strategies
- Upgrade the global Vite+ CLI (vp) to version 1.5.1 or later to enforce strict SemVer parsing on registry dist-tag responses.
- Audit untrusted repositories for custom 'registry' overrides in local '.npmrc' configuration files prior to running CLI commands.
- Pin explicit package manager versions in 'package.json' via the 'packageManager' field to prevent dynamic network dist-tag lookups.
- Avoid invoking 'vp env use' with the '--no-install' flag inside unverified or third-party project directories.
Remediation Steps:
- Check the currently installed Vite+ version by running 'vp --version' in your terminal.
- If the version is between 0.3.3 and 1.5.0, execute 'vp upgrade', 'brew upgrade vp', or 'npm install -g vite-plus@latest' to install version 1.5.1 or newer.
- Open a new terminal session or reload your shell profile (.bashrc, .zshrc, or config.fish) to ensure the updated binary is active in the shell integration wrapper.
- Verify the update by confirming 'vp --version' reports '1.5.1' or higher.
References
- CVE-2026-137190 Record on CVE.org
- NVD Vulnerability Detail: CVE-2026-137190
- GitHub Security Advisory: GHSA-p79r-mf8q-r78h
- Official Security Patch Commit (92edd550cf8d801d040fa3559aae906e8fa42dab)
- Vite+ Pull Request #3395
- Vite+ Release v1.5.1
- OSV Database Entry: GHSA-p79r-mf8q-r78h
- cvelistV5 Official JSON Record for CVE-2026-137190
Read the full report for CVE-2026-137190 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.