BTC $71,807
2026 Bull Run Is Building Start trading with 5% OFF all fees
Sign Up Now
BTC $71,807
Bull Run 2026 | 5% Off Fees Open your Binance account today
Sign Up

npm 12 Disables Risky Scripts by Default

npm 12 makes install scripts opt-in to block supply chain attacks in July 2026.

  • GitHub is introducing major security changes to npm version 12, disabling install scripts by default to counter supply chain attacks.
  • The update, scheduled for release in July 2026, blocks automatic code execution via lifecycle hooks during “npm install” commands.
  • Developers must now explicitly approve trusted scripts and dependencies, moving from a default-trust to an opt-in security model.
  • The changes also block dependencies from Git and remote URLs unless specific new flags like “–allow-git” are used.

On June 11, 2026, GitHub announced significant security-focused updates for the upcoming npm version 12, directly targeting the rampant threat of software supply chain attacks by making install scripts opt-in. This decisive move aims to shut down what the company describes as the “single largest code-execution surface in the npm ecosystem.”

- Advertisement -

Consequently, the default behavior of the “npm install” command will no longer run preinstall, install, or postinstall scripts from any dependencies. This change prevents a single compromised package anywhere in a project’s dependency tree from executing arbitrary code on a developer’s machine or CI runner, according to a detailed post on the GitHub community discussions page.

Meanwhile, the update also blocks the resolution of Git dependencies and remote URL dependencies by default. Developers must now explicitly allow these using new “–allow-git” or “–allow-remote” flags, a measure that closes additional code execution paths that were previously exploitable.

GitHub recommends developers prepare by upgrading to npm 11.16.0 or newer to review warnings and explicitly approve scripts they trust using the new “npm approve-scripts” command. The Microsoft-owned subsidiary stated that after approval, only vetted scripts will run following the upgrade.

These changes follow other recent npm security enhancements, including the “min-release-age” setting introduced earlier in 2026 to reject newly published packages. The shift represents a fundamental change in how the Node.js package manager handles trust and automatic code execution.

- Advertisement -

✅ Follow BITNEWSBOT on Telegram, Facebook, LinkedIn, X.com, and Google News for instant updates.

Previous Articles:

- Advertisement -
Ad
Altseason Is Loading. Don't watch from the sidelines.
SOL $90.51
DOGE $0.0963
LINK $9.02
SUI $1.00
5% off fees when you sign up
Start Trading
Ad
Pay Less on Every Trade. For Life.
$10K/mo volume Save $60/yr
$50K/mo volume Save $300/yr
$100K/mo volume Save $600/yr
5% off all trading fees when you sign up
Claim Your Discount

Latest News

Bitcoin Holds at $62K Amid Market Crash; Stocks Lose $1.1T

Bitcoin holds steady near $62,000 amid a major U.S. stock market crash that erased...

ARK Sells $7.5M in Robinhood Shares Despite Rally

Cathie Wood's Ark Invest sold 89,915 shares of Robinhood Markets worth approximately $7.5 million,...

Teen steals $13M in crypto via Google scams

A Canadian teen, Trenton Richard Johnston, pleaded guilty to conspiracy to commit money laundering...

Bankers Could Engineer SpaceX IPO Pop, Says Investor

Investor Gary Black suggests retail traders are selling Tesla shares to fund purchases of...

CFTC proposes rules for sports prediction markets.

The CFTC has proposed new rules, stating sports event contracts are generally not contrary...

Must Read

10 Best Crypto to Mine Without Special Hardware Equipment

A lot of people mostly think that it takes a difficult process to mine cryptocurrency. today we are going to show you some of...
Ad
Altseason Is Loading. These 4 coins are trending right now.
SOL $92.12
DOGE $0.0950
LINK $9.02
SUI $1.02
5% off spot fees when you sign up
Start Trading