Vulnerabilities · 93 days ago
npm is moving install-time execution from automatic trust to explicit approval. That changes who carries the burden: maintainers now have to pre-vet legitimate scripts, because the default install path will no longer run them on its own.
GitHub says npm v12, expected in July, will block dependency preinstall, install, and postinstall scripts unless they are explicitly allowed in the project. The same rule also affects node-gyp-style builds, prepare scripts from git, file, and link dependencies, plus Git and remote URL dependencies unless they are approved; npm 11.16.0 and later will warn about installs that will fail under the new default.
For teams that rely on install scripts, the risk is operational noise and broken builds, not just blocked malware. The approval model reduces opportunistic supply-chain abuse, but it also makes legitimate installs look closer to suspicious ones until project allowlists are in place.
5 sources covering this story
NPM 12 Will Change Script Execution Behavior to Prevent Supply Chain Attacks
By default, npm install will no longer execute scripts from dependencies, unless explicitly allowed.
GitHub to Update npm to Thwart Software Supply Chain Attacks
NPM, part of GitHub, announced a new version of the npm package manager with several security improvements, including disabling install scripts
GitHub to Disable npm Install Scripts by Default to Stop Supply Chain Attacks
npm 12 disables install scripts by default, requiring explicit approval to reduce dependency-based code execution risks.
RIP npm Postinstall Scripts: npm v12 Kills Auto Script Execution by Default
npm v12 finally kills automatic lifecycle script execution by default, the feature behind nearly every major supply chain attack.
GitHub announces npm security changes to tackle supply-chain attacks
GitHub has announced that npm v12, expected next month, will introduce several security-focused changes aimed at blocking supply-chain attacks abusing behaviors triggered by the 'npm install' command.
Part of the PlainSec briefing for 2026-06-12