OS Command Injection in pnpm - CVE-2025-69262
Published: April 27, 2026
pnpm
Detailed vulnerability description
The vulnerability allows a local privileged user to execute arbitrary code.
The vulnerability exists due to command injection in the loadToken() function in pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts when processing environment variable substitution in .npmrc tokenHelper settings. A local privileged user can control an environment variable that supplies the helper path to execute arbitrary code.
Exploitation requires use of tokenHelper settings with environment variable substitution in .npmrc during pnpm operations.