CVE-2025-69262
Command Injection in pnpm .npmrc Enables Remote Code Execution
Publication date: 2026-01-07
Last updated on: 2026-01-07
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| pnpm | pnpm | 10.27.0 |
| pnpm | pnpm | From 6.25.0 (inc) to 10.26.2 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
| CWE-78 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a Command Injection issue in pnpm versions 6.25.0 through 10.26.2. It occurs when environment variable substitution is used in .npmrc configuration files with tokenHelper settings. An attacker who can control environment variables during pnpm operations could exploit this to execute arbitrary commands remotely (Remote Code Execution) in build environments.
How can this vulnerability impact me? :
If exploited, this vulnerability allows an attacker to execute arbitrary code remotely within your build environment. This could lead to unauthorized access, data compromise, or disruption of your build processes.
What immediate steps should I take to mitigate this vulnerability?
Upgrade pnpm to version 10.27.0 or later, as this version contains the fix for the Command Injection vulnerability related to environment variable substitution in .npmrc configuration files with tokenHelper settings.