npm 12 and pnpm 11.10 tighten package install and registry token security
Supply Chain Risk · 12 sources · Updated 3mo ago · First seen Jul 8, 2026

GitHub has released npm v12 with major supply-chain protections enabled by default, blocking lifecycle install scripts, implicit node-gyp rebuilds, Git dependencies, and remote URL dependencies unless users explicitly approve them. The change is aimed at reducing install-time code execution abused by recent npm malware campaigns, and introduces an allowlist-style workflow for trusted scripts. GitHub also began phasing out granular access tokens that bypass two-factor authentication: those tokens will lose sensitive account, package, and organization management capabilities starting in August 2026, and are set to lose direct publishing rights in a later phase, with maintainers encouraged to use trusted publishing via OIDC or staged publishing with human 2FA approval instead.
pnpm 11.10 shipped parallel hardening measures focused on preventing credential theft and unsafe build behavior in package workflows. The release adds a structured _auth setting that binds credentials to a specific registry URL and only reads them from global configuration or environment variables, blocking malicious project files such as .npmrc or pnpm-workspace.yaml from redirecting tokens to attacker-controlled hosts. It also stops forwarding upstream registry credentials to install-accelerator servers, restricts pnpm deploy and pnpm pack-app from writing outside the project, prevents repositories from substituting macOS code-signing tools, and fixes a prototype pollution issue involving a dependency named __proto__.


