CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-137190

CVE-2026-137190: Shell Command Injection in Vite+ Global CLI via Unvalidated Registry Version String

Alon Barad
Alon Barad
Software Engineer

Dec 1, 2026·10 min read·4 visits

Executive Summary (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.

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.

Vulnerability Overview

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.

Root Cause Analysis

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:

  • For POSIX-compliant shells (sh, bash, zsh), it formats export {variable}={value}.
  • For Fish shells, it formats 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.

Code Analysis

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.

Exploitation

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-install

Vite+ 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.

Impact Assessment

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:

  • Confidentiality (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.
  • Integrity (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.
  • Availability (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.

Remediation

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@latest

For environments where an immediate upgrade to 1.5.1 cannot be performed, development teams should apply the following operational mitigations:

  1. Avoid --no-install in Untrusted Workspaces: Do not run vp env use --no-install or vp env use <pm>@latest --no-install inside unverified repositories.
  2. Audit Workspace .npmrc Files: Before activating shell environments or executing package manager commands in newly cloned repositories, inspect .npmrc for unauthorized registry= directives.
  3. Pin Explicit Package Manager Versions: Define exact semantic versions inside package.json (for example, "packageManager": "pnpm@10.0.0") or .node-version so Vite+ does not fall back to network dist-tag queries.

Official Patches

voidzero-devOfficial patch commit enforcing strict SemVer validation on dist-tag version responses
voidzero-devPull Request #3395: fix(pm): require a dist-tag version to be valid semver
voidzero-devVite+ Release v1.5.1
voidzero-devGitHub Security Advisory GHSA-p79r-mf8q-r78h

Fix Analysis (1)

Technical Appendix

CVSS Score
7.0/ 10
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Probability
0.04%
Top 100% most exploited

Affected Systems

voidzero-dev/vite-plus (Vite+ / vp global CLI)crates/vp_pm_clicrates/vp_global_cli

Affected Versions Detail

Product
Affected Versions
Fixed Version
vite-plus (vp CLI)
voidzero-dev
>= 0.3.3, < 1.5.11.5.1
AttributeDetail
Vulnerability ClassOS Command Injection (CWE-78) / Eval Injection (CWE-95)
CVSS v3.1 Score7.0 HIGH (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H)
Attack VectorLocal CLI execution with untrusted .npmrc registry and --no-install flag
Affected Componentfetch_dist_tag_version() in crates/vp_pm_cli/src/package_manager.rs
Vulnerable Versions>= 0.3.3, < 1.5.1
Patched Version1.5.1 (Commit 92edd550cf8d801d040fa3559aae906e8fa42dab)
Exploit StatusNo known public exploits or active exploitation
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1059.004Unix Shell
Execution
T1059.006Python
Execution
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

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.

Vulnerability Timeline

Security patch committed in PR #3395 (92edd550cf8d801d040fa3559aae906e8fa42dab)
2026-11-09
Vite+ v1.5.1 released containing the fix
2026-11-09
GitHub Security Advisory GHSA-p79r-mf8q-r78h published
2026-11-30
CVE-2026-137190 published to CVE.org and NVD
2026-11-30

References & Sources

  • [1]CVE-2026-137190 Record on CVE.org
  • [2]NVD Vulnerability Detail: CVE-2026-137190
  • [3]GitHub Security Advisory: GHSA-p79r-mf8q-r78h
  • [4]Official Security Patch Commit (92edd550cf8d801d040fa3559aae906e8fa42dab)
  • [5]Vite+ Pull Request #3395
  • [6]Vite+ Release v1.5.1
  • [7]OSV Database Entry: GHSA-p79r-mf8q-r78h
  • [8]cvelistV5 Official JSON Record for CVE-2026-137190

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-137191
7.8

CVE-2026-137191: Arbitrary Code Execution via Unverified Package Manager Bootstrap in Vite+ (vp)

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.

Alon Barad
Alon Barad
1 views•9 min read
•about 3 hours ago•CVE-2026-137196
6.3

CVE-2026-137196: Synchronous Event-Loop Denial of Service via Unbounded Ignore Pattern Expansion in node-glob

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.

Alon Barad
Alon Barad
6 views•10 min read
•about 4 hours ago•GHSA-R48V-R4VW-H9V8
5.5

GHSA-r48v-r4vw-h9v8: Arbitrary Build-Host File Disclosure via Path Traversal in Hugo Vendored Module Metadata

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.

Alon Barad
Alon Barad
5 views•9 min read
•about 5 hours ago•GHSA-4WHP-JX7J-XVRM
5.1

GHSA-4whp-jx7j-xvrm: Stored Cross-Site Scripting in Hugo Syntax Highlighter via wrapperClass

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.

Alon Barad
Alon Barad
4 views•9 min read
•about 7 hours ago•CVE-2026-139994
4.7

CVE-2026-139994: Cross-Site Scripting via Context-Mismatched HTML Escaping in React Router RSC Streaming Redirects

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.

Alon Barad
Alon Barad
8 views•11 min read
•about 8 hours ago•CVE-2026-139996
7.4

CVE-2026-139996: Prototype Pollution in React Router via Vendored turbo-stream Deserializer

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.

Amit Schendel
Amit Schendel
6 views•9 min read