CVE-2026-50017: pnpm Credential Leakage via Repository .npmrc Files
pnpm, a widely-used Node.js package manager, has a credential leakage vulnerability that can expose your authentication tokens to unintended registries. If you use pnpm and store authentication credentials in your user-level npm configuration, a malicious or compromised repository with a local .npmrc file can trick pnpm into sending your personal authentication token to a registry of the attacker's choosing during package installation or metadata fetches. This happens because pnpm applies user-level credentials to repository-specified registries without proper validation, creating a window for credential theft.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-200, CWE-522
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-30
NVD description (verbatim)
pnpm is a package manager. Prior to 10.34.0 and 11.4.0, pnpm can send user-level unscoped npm authentication credentials to a registry chosen by a repository-local .npmrc file. In the reproduced case, the user's npm config contains a default registry and an unscoped _authToken. The repository does not provide a token-bearing auth line. It only sets registry= to a different registry URL. During normal pnpm metadata/install workflows, pnpm binds the user-origin unscoped credential to the repository-selected registry and sends it as an Authorization header. This vulnerability is fixed in 10.34.0 and 11.4.0.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-50017 is a credential binding vulnerability in pnpm prior to versions 10.34.0 and 11.4.0. The root cause is improper credential scope handling: when a repository specifies a registry URL in a local .npmrc file, pnpm incorrectly binds unscoped authentication tokens from the user's global npm configuration to that repository-chosen registry. The flaw occurs during dependency resolution and package installation workflows. An attacker controlling a repository can set registry= in .npmrc to point to an attacker-controlled registry, and if a user with stored credentials in their global npm config runs pnpm install or fetches metadata, the Authorization header carrying the user's token is sent to the attacker's registry. The vulnerability requires local repository access (via git clone or similar) and authenticated user interaction, limiting but not eliminating real-world risk.
Business impact
Compromised npm credentials pose significant supply chain risk. A leaked authentication token grants an attacker the ability to publish malicious packages under the affected user's identity, modify published packages if the user has maintainer rights, or access private packages. For organizations with developers using pnpm, this vulnerability creates a pathway for account takeover and potential insertion of backdoors into internal or public dependencies. The impact severity depends on the privileges associated with the leaked token and the number of projects that token can access.
Affected systems
All installations of pnpm prior to version 10.34.0 (if on the 10.x branch) or prior to version 11.4.0 (if on the 11.x branch or later) are vulnerable. The vulnerability applies only to users who have configured an unscoped _authToken in their user-level .npmrc configuration file and who run pnpm commands (install, add, or metadata operations) on repositories with attacker-controlled local .npmrc files. Developers and CI/CD systems running these pnpm versions are at risk.
Exploitability
Exploitability is moderate. The attack requires a repository under the attacker's control and a user with pre-configured npm credentials to clone and run pnpm commands on that repository. No network-level vulnerability or zero-day authentication bypass is needed—only social engineering or supply chain compromise (e.g., a popular repository being compromised). The CVSS vector (AV:N/AC:L/PR:L) reflects that network access and low attack complexity are required, with user interaction implicit in running pnpm on a cloned repository. Automated CI/CD pipelines that fetch and install dependencies are a high-risk vector, as they may operate with stored credentials and without human review of repository configurations.
Remediation
Upgrade pnpm immediately to version 10.34.0 or later (10.x users) or version 11.4.0 or later (11.x and newer users). Verify the upgrade by running 'pnpm --version' after installation. Additionally, conduct a token audit: rotate any npm authentication tokens that may have been exposed while running older pnpm versions, especially if you used pnpm on untrusted or third-party repositories. Review your global .npmrc for unscoped tokens and consider migrating to scoped token configurations or .npmrc file-based auth (e.g., per-registry tokens) to limit exposure.
Patch guidance
The patch is available in pnpm 10.34.0 and 11.4.0. Users on version 10.x should upgrade to 10.34.0; users on 11.x and later should upgrade to 11.4.0 or the latest available release. Verify against the official pnpm release notes at https://github.com/pnpm/pnpm/releases to confirm patch applicability and any breaking changes. For enterprise environments, test the upgrade in a non-production environment first, as pnpm minor and patch releases occasionally introduce behavioral changes in credential handling. If you maintain private registries, confirm compatibility before broad rollout.
Detection guidance
Examine pnpm version numbers across your development team and CI/CD infrastructure using 'pnpm --version' or querying package.json lock files (pnpm-lock.yaml). Check for pnpm installations older than 10.34.0 or 11.4.0. Review .npmrc files (both user-level at ~/.npmrc and repository-level) to identify which repositories have custom registry configurations and which users have unscoped _authToken entries. Enable audit logging on your npm registry to identify any unusual authentication attempts or package uploads from developer accounts during the vulnerability window. If your organization uses pnpm in CI/CD, audit job logs for authentication token exposure or unexpected registry requests.
Why prioritize this
While the CVSS score of 6.5 (MEDIUM) reflects limited attack complexity, the vulnerability is particularly relevant to development teams because it directly threatens credential security in a supply chain context. pnpm is popular among JavaScript/Node.js developers, and the attack surface includes any third-party or cloned repository. The lack of KEV designation does not diminish urgency—credential leakage vulnerabilities are actively exploited in the wild. Prioritize patching on machines and CI/CD pipelines with stored npm tokens, especially those running untrusted or frequently-updated dependencies.
Risk score, explained
The CVSS 6.5 (MEDIUM) score reflects: (1) Network-accessible attack vector (package installation is remote-capable); (2) low attack complexity (no special conditions required beyond repository cloning); (3) low privilege requirement (any authenticated npm user is at risk); (4) high confidentiality impact (full token disclosure); and (5) no integrity or availability impact from the vulnerability itself (though stolen tokens could enable downstream attacks). The score appropriately weights the credential exposure as a significant but not critical issue without cascading system compromise. Organizational risk may be higher if affected users have broad token privileges or control critical packages.
Frequently asked questions
Do I need to update if I don't store authentication tokens in my .npmrc?
No immediate update is required for your local pnpm installation if you do not have an _authToken in your user-level .npmrc file. However, you should still upgrade to maintain security posture and to prevent accidental future exposure if credentials are added later. If you use CI/CD systems or shared developer machines, check those environments as well.
Will updating pnpm to the patched version break my existing workflow?
Upgrading to 10.34.0 or 11.4.0 should not introduce breaking changes in normal workflows. The patch corrects credential handling behavior, which may change how some registry-specific authentication is applied—but this aligns with correct security semantics. Verify your private registry configurations and test in a staging environment if you maintain custom npm registries.
What if I've already run pnpm on a repository I suspect was malicious?
Rotate your npm authentication tokens immediately as a precaution. Check your npm account activity log and package publish history for unexpected changes. If you used the token in CI/CD, review logs for unusual registry requests or package uploads. Enable two-factor authentication on your npm account if not already enabled.
Can I work around this vulnerability without upgrading?
A temporary mitigation is to remove or comment out the _authToken line from your user-level .npmrc and use scoped credentials or registry-specific tokens instead. However, this is not a complete solution if you rely on an unscoped token for access to private packages. Upgrading is the recommended fix.
This analysis is provided for informational purposes and is current as of the published date. Verify all patch versions, vendor advisories, and affected product lists against official pnpm releases and your specific environment before taking action. CVSS scores are provided by the source data and represent a snapshot of vulnerability severity at publication; organizational risk may differ based on your infrastructure, token privileges, and exposure to untrusted repositories. Consult your security team and pnpm documentation for deployment-specific guidance. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-55180MEDIUMpnpm Environment Variable Leakage in .npmrc Configuration
- CVE-2026-32315MEDIUMmotionEye Configuration File Permissions Exposure (Medium)
- CVE-2026-54276MEDIUMAIOHTTP DigestAuthMiddleware Cross-Origin Credential Disclosure
- CVE-2024-45636MEDIUMIBM QRadar EDR Plaintext Credential Storage (3.12–3.12.24)
- CVE-2026-10254MEDIUMUnauthenticated Information Disclosure in SourceCodester Pet Grooming Software
- CVE-2026-10854MEDIUMMISP Galaxy Visibility Control Bypass – Unauthorized Private Metadata Access
- CVE-2026-10864MEDIUMMISP Dashboard Widget Field Filtering Bypass (Medium)
- CVE-2026-11162MEDIUMChrome CSS Cross-Origin Data Leak Vulnerability