Dec 1, 2026·10 min read·4 visits
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.
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.
Vite+ (voidzero-dev/vite-plus) is a unified web development toolchain that provides a global command-line interface (vp) for managing runtime environments, package managers, and build workflows. To adjust active environment variables within a developer's terminal session, the vp CLI integrates with standard shells including Bash, Zsh, POSIX sh, and Fish through wrapper functions. When a developer executes the vp env use subcommand, the CLI outputs shell-specific variable assignment directives to standard output, which the parent shell wrapper immediately evaluates via eval.
In Vite+ versions starting from 0.3.3 and prior to 1.5.1, the vp env use subcommand contains an OS Command Injection (CWE-78) and Eval Injection (CWE-95) vulnerability. The flaw resides in the relationship between the package manager dist-tag resolution routine in crates/vp_pm_cli/src/package_manager.rs and the environment export generator in crates/vp_global_cli/src/commands/env/use.rs. When Vite+ resolves a symbolic dist-tag (such as latest) rather than a pinned version, it queries the configured npm registry over HTTP and extracts the version field from the JSON payload.
Under normal execution paths, the resolved version string is passed to the package installer, which enforces strict semantic version parsing before downloading artifacts. However, when the user passes the --no-install flag, Vite+ bypasses the installation pipeline and sends the raw registry response directly to the shell command generator. Because the CLI respects repository-level .npmrc configuration files, a developer executing vp env use --no-install inside an untrusted repository can be silently directed to an attacker-controlled registry.
If the malicious registry returns a version string containing shell metacharacters (such as ;, |, &, or $()), Vite+ formats these characters without quoting or validation into the export or set -gx statement. When the shell integration wrapper evaluates this output, the injected directives execute as arbitrary operating system commands under the local developer's user account privileges.
The root cause of CVE-2026-137190 is an inconsistency in input validation boundaries between the network data ingestion layer (fetch_dist_tag_version) and the downstream consumers of that data. In crates/vp_pm_cli/src/package_manager.rs, the function fetch_dist_tag_version is responsible for querying an npm-compatible registry endpoint (for example, /<package_manager>/<tag>) and deserializing the JSON response into a PackageJson struct. Prior to version 1.5.1, the deserialization step verified only that the version field was a valid JSON string, returning Ok(package_json.version) directly to the caller without checking its syntactic structure.
The downstream architectural assumption in Vite+ was that package manager version strings always conform to the Semantic Versioning (SemVer) 2.0.0 specification. When vp env use runs without --no-install, the version string is passed to the package installation routine, which parses the string using a strict SemVer parser to resolve download URLs and local cache paths. That parser acts as an accidental security guard by rejecting any string containing whitespace or shell control characters before the environment modification statements are generated.
When the --no-install flag is provided, the execution flow intentionally skips the installer pipeline and proceeds directly to vp_global_cli/src/commands/env/use.rs. This module constructs shell configuration commands to update the current terminal session:
sh, bash, zsh), it formats export {variable}={value}.set -gx {variable} {value}.Because the generator assumed the version string contained only alphanumeric characters, dots, and hyphens, it performed unquoted string interpolation. Furthermore, Vite+ initializes its HttpClient using npm_config loaded from the current working directory. If an untrusted workspace lacks an explicit package manager version pin in package.json, .node-version, or pnpm-workspace.yaml, and contains a .npmrc file defining a custom registry URL, Vite+ automatically queries the untrusted endpoint during dist-tag resolution.
> [!NOTE]
> The vulnerability was introduced in commit 45f9b9ac7128c2829f9130352ebcdc6462aca3d9 when dist-tag resolution and environment activation were integrated without enforcing structural validation at the HTTP deserialization boundary.
The vulnerability was remediated in commit 92edd550cf8d801d040fa3559aae906e8fa42dab (Pull Request #3395) by introducing strict semantic version validation directly inside fetch_dist_tag_version within crates/vp_pm_cli/src/package_manager.rs. By placing the validation check at the data ingestion point, the patch ensures that any registry response for a dist-tag is verified before the version string can propagate to --no-install code paths, session state files, or shell stdout sinks.
// File: crates/vp_pm_cli/src/package_manager.rs
async fn fetch_dist_tag_version(
package_manager_type: PackageManagerType,
tag: &str,
npm_config: &NpmConfig,
) -> Result<String, Error> {
// ... URL construction omitted ...
let client = HttpClient::with_npm_config(3, 500, npm_config.clone());
for url in urls {
match client.get_json::<PackageJson>(url).await {
// VULNERABLE (Prior to 1.5.1):
// Ok(package_json) => return Ok(package_json.version),
// PATCHED (1.5.1+):
Ok(package_json) => {
let version = package_json.version;
// The registry controls this reply, and a dist tag must resolve
// to an exact version. Require strict semver on the raw value,
// as the installer does, so the returned version has no
// surrounding whitespace or other characters.
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),
}
}
// ...
}The patch utilizes Version::parse(&version) from the standard Rust semver crate. According to the SemVer 2.0.0 grammar enforced by Version::parse, a valid version string must consist exclusively of numeric major, minor, and patch segments ([0-9]+) separated by periods, optionally followed by a pre-release hyphen and build metadata composed strictly of ASCII alphanumeric characters and hyphens ([0-9A-Za-z-]).
Crucially, Version::parse operates on the raw string without trimming leading or trailing whitespace. As demonstrated in the accompanying regression test dist_tag_resolution_rejects_a_non_semver_version, payloads containing spaces, newlines (\n), or trailing tokens (such as "1.0.0 not a version", "\n1.0.0", or "1.0.0 ") immediately return an Err, causing fetch_dist_tag_version to abort with Error::InvalidArgument.
// Regression test added in commit 92edd550cf8d801d040fa3559aae906e8fa42dab
for payload in ["1.0.0 not a version", "\n1.0.0", " 1.0.0", "1.0.0\n", "1.0.0 "] {
let server = MockServer::start();
server.mock(|when, then| {
when.method(GET).path("/pnpm/latest");
then.status(200).json_body(serde_json::json!({ "version": payload }));
});
// ... verifies resolve_package_manager_version returns Err(Error::InvalidArgument(_))
}Regarding fix completeness, enforcing Version::parse at the HTTP response boundary completely neutralizes command injection via dist-tag responses because no character outside [0-9A-Za-z.-+] can pass validation. In POSIX and Fish shells, alphanumeric characters, periods, hyphens, and plus signs have no special command separator or expansion semantics when placed on the right-hand side of an assignment (export VAR=1.2.3-beta+build.1). Consequently, even without adding shell quoting in vp_global_cli/src/commands/env/use.rs, the restricted character set makes shell metacharacter injection impossible through this vector.
Exploiting CVE-2026-137190 requires a developer with an affected version of Vite+ (>= 0.3.3, < 1.5.1) and active shell integration to interact with an attacker-crafted repository. Because the vulnerability relies on local shell wrapper evaluation and specific command flags, it is classified with High Attack Complexity (AC:H) and Required User Interaction (UI:R).
To prepare the exploit, an attacker creates a Git repository that omits explicit package manager version declarations (ensuring package.json has no packageManager field, and removing .node-version or pnpm-workspace.yaml version pins). Inside the root of this repository, the attacker places a .npmrc file pointing to an HTTP server under their control:
registry=http://127.0.0.1:8080/Next, the attacker configures the HTTP server at 127.0.0.1:8080 to respond to package manager dist-tag queries (such as GET /pnpm/latest or GET /yarn/latest) with a crafted JSON payload containing shell control operators inside the version property:
{
"name": "pnpm",
"version": "10.0.0; id > /tmp/vp_compromised; #"
}When the victim clones the repository, navigates into the project directory, and executes the environment activation command with the --no-install flag:
vp env use pnpm@latest --no-installVite+ reads the local .npmrc, queries http://127.0.0.1:8080/pnpm/latest, and extracts the malicious version string without invoking the installer. The CLI then prints the unquoted environment export directive to standard output:
export VP_PNPM_VERSION=10.0.0; id > /tmp/vp_compromised; #The active shell integration wrapper captures standard output and evaluates it via eval. The shell first sets VP_PNPM_VERSION=10.0.0, terminates the assignment at the semicolon ;, executes the injected command id > /tmp/vp_compromised, and treats any trailing characters after # as a comment. In a Fish shell environment, where Vite+ outputs set -gx VP_PNPM_VERSION 10.0.0; id > /tmp/vp_compromised; #, the same semicolon command termination achieves identical execution.
CVE-2026-137190 carries a CVSS v3.1 base score of 7.0 (HIGH) with the vector CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H. The Local attack vector (AV:L) and Required User Interaction (UI:R) reflect that the payload executes on the developer's workstation only after the user clones a repository and invokes the vp env use CLI command. The High Attack Complexity (AC:H) accounts for the combination of prerequisites: shell integration must be active, the project cannot have a local version pin if relying on implicit resolution, and the --no-install flag must be passed to bypass the installer's SemVer check.
Despite these constraints, successful exploitation grants the attacker arbitrary code execution with the full permissions of the local user running the terminal session. In developer and CI/CD environments, this leads to high impacts across confidentiality, integrity, and availability:
C:H): The injected command has read access to local SSH keys (~/.ssh/), cloud provider credentials (~/.aws/, ~/.config/gcloud/), npm authentication tokens (~/.npmrc), Git credentials, and proprietary source code.I:H): The attacker can modify local source files, inject backdoors into build artifacts, alter user shell profiles (~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish) for persistence, or push unauthorized commits.A:H): The payload can delete local workspaces, terminate background processes, or corrupt the developer's local toolchain installation.As of publication, there is no evidence of active in-the-wild exploitation, no public weaponized exploit repository, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
Users and organizations utilizing Vite+ should upgrade the global vp CLI and all project dependencies to version 1.5.1 or later. Version 1.5.1 incorporates commit 92edd550cf8d801d040fa3559aae906e8fa42dab, which rejects any registry dist-tag version that does not strictly conform to the SemVer 2.0.0 specification.
To update the global Vite+ CLI installation, run the built-in upgrade command or update via your system package manager:
# Using the Vite+ built-in upgrader
vp upgrade
# Or via Homebrew
brew upgrade vp
# Or via npm global installation
npm install -g vite-plus@latestFor environments where an immediate upgrade to 1.5.1 cannot be performed, development teams should apply the following operational mitigations:
--no-install in Untrusted Workspaces: Do not run vp env use --no-install or vp env use <pm>@latest --no-install inside unverified repositories..npmrc Files: Before activating shell environments or executing package manager commands in newly cloned repositories, inspect .npmrc for unauthorized registry= directives.package.json (for example, "packageManager": "pnpm@10.0.0") or .node-version so Vite+ does not fall back to network dist-tag queries.CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
vite-plus (vp CLI) voidzero-dev | >= 0.3.3, < 1.5.1 | 1.5.1 |
| Attribute | Detail |
|---|---|
| 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 |
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Vite+ (vp) versions 0.2.9 through 1.5.0 contain an integrity verification flaw (CWE-494) in the internal package manager bootstrap mechanism. When initializing in an environment where the pinned pnpm distribution is not cached, the runtime queries the registry specified in the local workspace's .npmrc file and validates the downloaded tarball exclusively against the self-reported integrity digest provided by that same registry. An attacker who supplies a repository with a malicious .npmrc pointing to an attacker-controlled registry can achieve arbitrary code execution when a developer or CI runner invokes basic vp commands.
CVE-2026-137196 (also tracked as GHSA-qxr8-q827-836c) is an asymmetric resource consumption and denial-of-service vulnerability affecting the npm package glob (node-glob) in versions 13.0.5 through 14.0.5. When processing primary search patterns, node-glob relies on the minimatch engine with a default safeguard parameter (braceExpandMax: 10_000) to prevent combinatorial explosions during shell brace and directory traversal expansion. However, the Ignore class in src/ignore.ts instantiated its internal minimatch options with optimizationLevel: 2 while omitting the braceExpandMax configuration property. Consequently, applications that pass untrusted input into the ignore option allow attackers to trigger unbounded pattern expansion and quadratic O(n^2) preprocessing loops inside secondPhasePreProcess(), leading to single-threaded Node.js event-loop starvation.
Hugo versions prior to 0.170.0 contain a path traversal and improper symlink resolution vulnerability in the module resolution and vendoring subsystem. By supplying relative traversal sequences in `_vendor/modules.txt` or crafting symbolic links within vendored directory hierarchies, an untrusted third-party theme or Hugo module can bind its module root to an arbitrary directory on the build host. During site compilation, template functions such as `readFile` can access and render sensitive files from the host filesystem into the generated static output.
A stored Cross-Site Scripting (XSS) vulnerability in the Hugo static site generator (versions 0.140.2 prior to 0.170.0) allows content authors to inject arbitrary HTML and JavaScript into generated pages. The flaw resides in the syntax highlighting component (`markup/highlight/highlight.go`), where the `wrapperClass` option is concatenated directly into an HTML `<div class="...">` attribute without HTML entity escaping. Because shortcodes and code fence attributes bypass Goldmark's raw HTML sanitization rules, untrusted contributors in multi-author workflows can achieve client-side script execution in the browsers of site visitors.
CVE-2026-139994 (GHSA-mjj8-rxh9-q8f5) is a Cross-Site Scripting (XSS) vulnerability in React Router affecting versions 7.11.0 through 7.18.3 and 8.0.0 through 8.3.1. The flaw resides in the server-side streaming handler for the unstable React Server Components (RSC) Data mode and RSC Framework mode. When a server-side redirect is triggered during an HTML stream, the framework injects an inline <meta http-equiv="refresh"> element into the response stream. Because the redirect destination URL is sanitized using an HTML body escaping utility (escapeHtml) rather than an attribute-specific encoding function, double-quote characters (") are left unescaped. An attacker who can influence the redirect URL can break out of the content attribute context, inject arbitrary attributes or HTML elements, and execute arbitrary JavaScript within the victim's browser session.
CVE-2026-139996 is a prototype pollution vulnerability (CWE-1321) in React Router's vendored turbo-stream deserializer, utilized in Framework mode for single-fetch transitions and client-server hydration. When unflattening serialized streams, the decoder assigns object properties using direct bracket notation (object[key] = value) rather than defining own properties via Object.defineProperty. Furthermore, the deserializer lacks integer and bounds validation on stream reference indices. An attacker capable of supplying crafted turbo-stream payloads to the deserializer can pollute Object.prototype or trigger arbitrary index dereferences, compromising application integrity and confidentiality.