Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-50014 — pnpm

🟡 CVSS 6.4 — Medium ⚠️ Exploit Public CWE-88 OSV
6.4
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

pnpm: Git Fetch Argument Injection via Lockfile resolution.commit

Summary

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.

Vulnerability Details

The vulnerable path is in fetching/git-fetcher/src/index.ts. When a git dependency host is configured for shallow fetching, pnpm calls:

```typescript

await execGit(['fetch', '--depth', '1', 'origin', resolution.commit], { cwd: tempLocation })

```

Because resolution.commit is appended before a -- separator, Git can parse a commit value beginning with - as an option. The same file later passes the value to git checkout without a separator:

```typescript

await execGit(['checkout', resolution.commit], { cwd: tempLocation })

```

resolution.commit comes from the lockfile and is typed as a plain string; pnpm does not validate it as a 40-character hexadecimal commit before passing it to Git.

Proof of Concept

```bash

bash autofyn_audit/exploits/vuln11_git_upload_pack_rce/exploit.sh

# Creates a local bare git repo and triggers the shallow-fetch path.

# Replaces the lockfile commit hash with '--upload-pack=touch /tmp/vuln11_pwned'.

# Result: PASS -- /tmp/vuln11_pwned created by injected touch command.

```

The PoC uses a local file://githost/... repository because the injection requires a local or SSH transport. HTTPS transport ignores --upload-pack.

Impact

Code execution as the user running pnpm install, under specific transport conditions. The attacker must modify pnpm-lock.yaml, and the affected dependency must use SSH or local git transport. HTTPS transport (the common case) is immune.

Suggested Remediation

Add a -- separator before lockfile-controlled git revision values. Validate resolution.commit matches /^[0-9a-f]{40}$/i before passing to Git.

> Discovered by [AutoFyn](https://github.com/SignalPilot-Labs/AutoFyn)

> Full audit report: [audit_report.md](https://github.com/tempcollab/pnpm/blob/main/autofyn_audit/audit_report.md)

> Exploit script: [exploit.sh](https://github.com/tempcollab/pnpm/blob/main/autofyn_audit/exploits/vuln11_git_upload_pack_rce/exploit.sh)

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs low-level privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-50014 is classified as CWE-88: Argument Injection. Input is passed into a command line without separating data from options, letting an attacker introduce extra arguments.

Affected software

CVE-2026-50014 is recorded against 1 package.

  • pnpm

Timeline and source

Published on 26 June 2026 and last revised on 29 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)

Other advisories for this package

pnpm has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-88: Argument Injection) in other software:

Details

Severity MEDIUM
CVSS Score 6.4
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
CWE CWE-88
Public Exploit ⚠️ Yes
Source OSV
Published 2026-06-26
Updated 2026-08-20
Modified 2026-06-29
Fix URL N/A

Affected Packages

Software From version Fixed in
pnpm — —

Similar Threats

Exploit Protection

Are you running pnpm?

CVE-2026-50014 carries CVSS 6.4 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-50014 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓