The images in this article were generated with artificial intelligence. How we publish
GitHub and the npm team have decided to tighten the default behavior of the package installer: in npm v12 The installation scripts will be deactivated by default and the resolution of units from remote Git or URLs repositories shall be restricted unless explicitly authorized by the developer. The measure seeks to close one of the most exploited routes in attacks to the supply chain: the automatic execution of code during "npm install" by means of life cycle hooks (pre-install, install, post-install and prepare).
The change responds to a real and common risk: a committed package at any point in the transitional chain can run code on the developer machine or in a CI runner. Many projects, libraries and tools depend on scripts that run automatically when installing dependencies, and that default trust is what attackers have used to insert back doors or run malicious payloads in development and deployment environments.

The practical implications are dual. On the one hand, improving safety by requiring the explicit approval of the execution of scripts and the resolution of unregistered sources; on the other hand, it may break up building and development flows which today depend on automatic native compilations (node-gyp), prepare scripts from Git references, or packages installed from remote tarballs. Equipment and projects using units with native compilation or direct references to repositories will have to be adapted.
GitHub recommends preparing already by updating to npm 11.16.0 or more, running a normal installation and reviewing the warnings that npm shows. The tool offers an approval flow with npm approved, which allows to review, approve the trust scripts and compromise the changes to the package.json so that only the approved ones continue to run after going up to npm v12. It's an opportunity to consciously audit which packages really need to run code locally.
As practical measures to reduce the impact and improve the security of your supply chain, consider the following: test changes in an isolated branch and in CI runners before migrating; update CI images or containers to include the new version of npm; avoid Git or remote dependencies without justification and, if needed, explicitly authorize them; prioritize the use of lockfiles and fixed versions; and treat with special care the packages that make native compilation (node-gyp), as npm can block implicit rebuildings.

In addition, it integrates complementary controls: it enables the analysis of dependencies and alerts (for example, Dependabot or Snyk) to detect suspicious changes, it requires human verification for relevant pull requests, it enables 2FA and publishing policies in the npm register for the maintainers, and it retains evidence of origin with SBOM and signatures where possible. GitHub's good practice documentation on supply chain security is a good starting point: https: / / docs.github.com / en / code-security / supply-chain-security.
To understand exactly which scripts and behaviors will be affected it is appropriate to read the official npm documentation on scripts and lifecycle hooks; this helps to identify in your tree of dependencies where scripts are run and which ones you need to explicitly approve: https: / / docs.npmjs.com / cli / v12 / using-npm / scripts. Adjust the pre-launch window to audit and reduce the attack surface: less reliable default scripts = less unauthorised execution risk.
In short, npm v12 represents a significant advance in protecting the JavaScript supply chain by converting an extension of tacit confidence into an explicit permit. The teams that take these measures with additional planning, testing and control will reduce their exposure to supply-chain attacks while avoiding unexpected interruptions in their construction and deployment processes.
Related
More news on the same subject.

GitLab critical alert: emergency patch fixes CVE-2026-19478 allowing to modify or eliminate public projects without credentials
GitLab published an emergency patch on August 17, 2026 to correct critical vulnerability in its self-hosted software (Community and Enterprise Edition) which, under certain cond...

When the MCP server keeps your credentials: the silent attack vector of the IA in production
The incorporation of IA agents into business processes has opened a practical way for production systems and data to be accessible from models: it is called Model Context Protoc...

Critical alert: CVE-2026-58231 in SAP Commerce Cloud could allow remote code execution; patch and urgent mitigation
A critical vulnerability that affects SAP Commerce Cloud, registered as CVE-2026-58231 and with maximum score 10.0 on the CVSS scale, it is being exploited attempts shortly afte...

The massive purchase of expired domains drives fraud, malware and streaming pirate: the business behind the dropcatch
An intelligence report on DNS published by Infoblox and disseminated by specialized media confirms that criminals are buying large-scale expired domains - the so-called dropcatc...

HoneyMyte updates CoolClient with a signed kernel driver to hide processes and protect the C2 channel
Kaspersky has published an analysis that attributes to the actor known as HoneyMyte (also Mustang Panda) an updated version of the CoolClient backdoor that incorporates a signed...

GeoServer on zero-day vulnerability alert in jsonArrayContains with real risk of remote execution
The GeoServer open source project has a zero-day vulnerability that is being actively explored by attackers, according to researchers' public alerts and the watchTowr intelligen...

AmnesiaStealer MacOS malware that steals credentials and controls real-time browser sessions
Security researchers have documented a new malware family aimed at macOS - called AmnesiaStealer - that combines a dropper in shell, an infostealer written in Rust and a remote ...