
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-69262 is a command injection vulnerability in pnpm, the fast and disk-space-efficient Node.js package manager, affecting versions 6.25.0 through 10.26.2. The flaw exists in the environment variable substitution mechanism used in .npmrc configuration files when the tokenHelper setting is configured. An attacker who can control environment variables during pnpm operations can achieve Remote Code Execution (RCE) in build environments. It was discovered on 2025-11-02 and publicly disclosed on January 7, 2026. The CVSS v3.1 base score is 7.8 (High) per Feedly/NVD, and 7.5–7.6 (High) per the GitHub Advisory (Github Advisory, pnpm Advisory).
The vulnerability is classified as CWE-78 (OS Command Injection) and CWE-94 (Code Injection). The root cause is a two-stage flaw: first, readLocalConfig.ts performs unsanitized ${VAR} environment variable substitution on .npmrc values (including the tokenHelper key) via envReplace(); second, the resolved tokenHelper path is passed to spawnSync(helperPath, { shell: true }) in getAuthHeadersFromConfig.ts's loadToken() function, which only validates that the path is absolute and exists — not that it is trusted or safe. Because shell: true is used, an attacker-controlled environment variable pointing to a malicious script will result in arbitrary OS command execution when pnpm performs authentication against a registry. A public proof-of-concept is included in the advisory (pnpm Advisory, Github Advisory).
Successful exploitation grants an attacker full code execution in the context of the pnpm process, with high impact to confidentiality, integrity, and availability. The highest-risk environments are CI/CD pipelines (GitHub Actions, GitLab CI), Docker build environments, and Kubernetes deployments where environment variables can be influenced by an attacker — for example, through a compromised dependency, a malicious pull request, or control over CI secrets. In such scenarios, an attacker could exfiltrate secrets (e.g., registry tokens, API keys), tamper with build artifacts, or pivot to production deployments via supply chain compromise (pnpm Advisory).
A proof-of-concept exploit is publicly documented in the GitHub Security Advisory, demonstrating the full attack chain from environment variable control to arbitrary code execution (Github Advisory). The EPSS score is approximately 0.041% (13th percentile), indicating a low but non-negligible probability of exploitation in the near term. There is no current evidence of in-the-wild exploitation or threat actor attribution, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires local access and the ability to control environment variables and place a script on the filesystem, which limits opportunistic exploitation but makes it highly relevant in shared CI/CD or containerized build environments.
.npmrc and tokenHelper./tmp/evil-helper.sh) that performs the desired malicious action (e.g., exfiltrating secrets, writing a backdoor) and outputs a valid token string to stdout.cat > /tmp/evil-helper.sh << 'SCRIPT'
#!/bin/bash
echo "RCE SUCCESS!" > /tmp/rce-log.txt
echo "TOKEN_12345"
SCRIPT
chmod +x /tmp/evil-helper.sh.npmrc tokenHelper value (e.g., via a CI/CD pipeline secret, a compromised .env file, or a malicious dependency's install script).export HELPER_PATH=/tmp/evil-helper.sh.npmrc: Ensure the project's .npmrc references the environment variable in the tokenHelper setting (this may already be present in the target repository).registry=https://registry.npmjs.org/
registry.npmjs.org/:tokenHelper=${HELPER_PATH}pnpm install). During auth header resolution, envReplace() substitutes ${HELPER_PATH} with the attacker-controlled path, and loadToken() executes it via spawnSync(..., { shell: true })./tmp/*.sh) that output token strings; new or modified .npmrc files containing tokenHelper=${...} referencing environment variables; unexpected files written by build processes (e.g., /tmp/rce-log.txt)./bin/bash, sh, or arbitrary scripts) during pnpm install or other pnpm commands; spawnSync calls to paths in /tmp or other non-standard locations.BAD_TOKEN_HELPER_PATH or unexpected token helper paths; environment variable values referencing /tmp or attacker-controlled paths in build logs.pnpm install execution (pnpm Advisory).Upgrade pnpm to version 10.27.0 or later, which throws an error if the tokenHelper or :tokenHelper setting contains an environment variable, preventing the substitution-to-execution chain (pnpm Release). As an immediate workaround, disable tokenHelper in .npmrc and use direct static token authentication instead (//registry.npmjs.org/:_authToken=YOUR_TOKEN). Additionally, audit all CI/CD environment variables for unexpected values, restrict who can modify .npmrc files in repositories, and review build logs for anomalous script execution. IBM API Connect users should consult the IBM advisories for affected product versions (IBM Advisory 1, IBM Advisory 2).
The vulnerability was reported by security researcher Jiyong Yang (sy2n0@naver.com) and disclosed by pnpm maintainer Zoltan Kochan (zkochan) on January 7, 2026 (pnpm Advisory). The Hacker Wire covered the disclosure on social media platforms including Mastodon and Bluesky shortly after publication. IBM subsequently issued advisories for affected IBM API Connect products in May 2026 (IBM Advisory 1). Community reaction was moderate, with the fix noted as straightforward — throwing an error on environment variable usage in tokenHelper — and the advisory highlighting the supply chain risk in CI/CD environments.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."