The vulnerability is a command injection in pnpm's tokenHelper feature. It occurs in two stages. First, the readLocalConfig function in pnpm/config/config/src/readLocalConfig.ts reads the .npmrc file and substitutes environment variables. An attacker can craft a .npmrc file that uses an environment variable for the tokenHelper path. If the attacker controls this environment variable, they can point it to a malicious script. Second, the loadToken function in pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts takes this path and executes it using spawnSync with shell: true, which leads to remote code execution. The patch was applied to the readLocalConfig function to validate the tokenHelper value and disallow environment variables, thus preventing the injection.