CVE-2026-50014

pnpm: Git Fetch Argument Injection via Lockfile resolution.commit

Published Jun 25, 2026 CVSS 3.1 · 6.4 Medium EPSS < 1% KEV · Not listed
Description
pnpm is a package manager. Prior to 10.34.0 and 11.4.0, pnpm passes the lockfile-controlled git resolution.commit value to git fetch without a -- separator or commit-format validation. For git dependencies fetched through the shallow-fetch path, a malicious lockfile can replace the expected 40-character commit hash with a Git option such as --upload-pack=<command>. For SSH and local transports, --upload-pack can execute the supplied command. HTTPS transports ignore --upload-pack, so the practical attack surface is primarily SSH or local git dependencies. This vulnerability is fixed in 10.34.0 and 11.4.0.

Analysis

AI-generated

Technical impact

The vulnerability arises when pnpm passes a lockfile-controlled git resolution.commit value directly to the git fetch command without any separator or validation. A malicious lockfile can replace the expected 40‑character commit SHA with a git option such as --upload-pack=<command>. When the dependency is fetched over SSH or via a local path, the injected --upload-pack option is executed, allowing an attacker to run arbitrary shell commands on the host that executes pnpm. This is a form of command injection (CWE-78).

Affected Systems

pnpm package managers older than 10.34.0 or 11.4.0 are affected. Only the pnpm product is listed by the CNA.

Risk and Exploitability

The CVSS v3.1 score of 6.4 indicates moderate severity. The EPSS score of less than 1% shows exploitation likelihood is very low. The issue is not listed in the CISA KEV catalog. Exploitation requires a crafted lockfile processed during a pnpm install. If the lockfile references a git repository via SSH or a local path and the attacker supplies an --upload-pack option, the command is executed with the permissions of the pnpm process, allowing arbitrary code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pnpm to version 10.34.0 or newer, or to version 11.4.0 or newer, which removes the unchecked pass of resolution.commit to git fetch.
  • Avoid using SSH or local git URLs in lockfiles; prefer HTTPS URLs and do not rely on the shallow-fetch path from untrusted sources.
  • Validate lockfile integrity before installation, for example by running pnpm audit or by manually inspecting the lockfile for unexpected git options; reject any lockfile that contains an --upload-pack entry.

Generated by OpenCVE AI on July 31, 2026 at 16:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-p4xf-rf54-rj3x pnpm: Git Fetch Argument Injection via Lockfile resolution.commit
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pnpm
Pnpm pnpm
Vendors & Products Pnpm
Pnpm pnpm
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description pnpm is a package manager. Prior to 10.34.0 and 11.4.0, pnpm passes the lockfile-controlled git resolution.commit value to git fetch without a -- separator or commit-format validation. For git dependencies fetched through the shallow-fetch path, a malicious lockfile can replace the expected 40-character commit hash with a Git option such as --upload-pack=<command>. For SSH and local transports, --upload-pack can execute the supplied command. HTTPS transports ignore --upload-pack, so the practical attack surface is primarily SSH or local git dependencies. This vulnerability is fixed in 10.34.0 and 11.4.0.
Title pnpm: Git Fetch Argument Injection via Lockfile resolution.commit
Weaknesses CWE-88
References
Metrics cvssV3_1

{'score': 6.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 10:13 PM
Reserved
Jun 2, 2026, 10:46 PM
Status
Analyzed
Published
Jun 25, 2026, 6:16 PM
Modified
Nov 3, 2026, 11:17 PM
Severity
Moderate
Public date
Jun 25, 2026, 4:51 PM