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.

FBI and six countries link Integrity Technology Group to entity post theft in SE Asia
On October 8, the FBI and agencies in six countries issued a joint warning that assigns to a Chinese company, Integrity Technology Group, a sustained series of intrusions whose ...

Campaign with LLM and ARTEX attacks South Korean financial institutions and exfilters data
Security researchers have documented a campaign directed against South Korean financial institutions using language-driven attack tools to automate intrusions and data extractio...

ChainDrop campaign exposes tensorlake in npm; version 0.5.144 withdrawal
A package of npm called tensorlake, an SDK in TypeScript oriented to Tensorlake applications and services, was engaged in a supply chain campaign linked to the attack family kno...

Google reports DNS kidnapping: TLS certificates for google.com.gh, google.sl and google.as
Google reported on October 6 that attackers managed to issue unauthorized HTTPS certificates for Google and YouTube names after compromising authoritative DNS records of three t...

Cyber risk in 2026 moves to workflows and IA, according to Voice of the CISO
The data added by five editions of the Voice of the CISO study - including the most recent findings of 2026 - draw a less intense change than risk location: the threat is moving...

Phishing BitB points to advertising professionals and account managers to steal MFA
Security researchers have described a phishing campaign for advertising professionals and account managers that uses a human-operated platform to mimic ad products linked to IA ...

LibreOffice / OpenOffice Calc allows remote source execution when opening ODB / JDBC leaves
Researchers have shown that a malicious spreadsheet can force LibreOffice and Apache OpenOffice to run code controlled by an attacker at the time the file is opened, without sho...