Skip to content
  • Home
  • Cyber Map
  • About Us – Contact
  • Disclaimer
  • Terms and Rules
  • Privacy Policy
Cyber Web Spider Blog – News

Cyber Web Spider Blog – News

Globe Threat Map provides a real-time, interactive 3D visualization of global cyber threats. Monitor DDoS attacks, malware, and hacking attempts with geo-located arcs on a rotating globe. Stay informed with live logs and archive stats.

  • Home
  • Cyber Map
  • Cyber Security News
  • Security Week News
  • The Hacker News
  • How To?
  • Toggle search form
GitHub to Restrict npm Scripts by Default to Enhance Security

GitHub to Restrict npm Scripts by Default to Enhance Security

Posted on June 13, 2026 By CWS

GitHub is set to implement significant security updates in version 12 of npm, aiming to bolster defenses against software supply chain threats. Announced on June 11, 2026, these changes include disabling install scripts by default, a move designed to prevent the automatic execution of potentially harmful code.

New Security Measures in npm

The forthcoming npm changes target attack strategies that exploit the ‘npm install’ command. This command is vital for downloading and installing dependencies for Node.js projects. However, it also presents a vulnerability: it can execute scripts from all transitive dependencies, risking arbitrary code execution if even one package in the chain is compromised. Scheduled for release next month, npm version 12 will address these concerns.

By requiring user consent before any code execution during the install process, GitHub aims to close a significant security loophole. The company stated that making script execution an opt-in process ensures only trusted packages can execute scripts automatically.

Specific Changes and Their Implications

Under the new rules, ‘npm install’ will not execute preinstall, install, or postinstall scripts from dependencies unless explicitly permitted. Additionally, Git dependencies will not be resolved unless the –allow-git flag is used. Similarly, dependencies from remote URLs will require the –allow-remote flag.

This approach also extends to node-gyp builds. Even without an explicit install script, packages with a binding.gyp will face restrictions due to npm’s default behavior of running an implicit node-gyp rebuild.

To prepare for these changes, GitHub advises developers to update to npm 11.16.0 or newer and review the warnings that appear during installations. This proactive preparation will help developers smoothly transition to the new system.

Guidance for Developers

GitHub suggests using the ‘npm approve-scripts –allow-scripts-pending’ command to identify which packages have scripts and to approve those deemed trustworthy. By committing the updated package.json, developers ensure only these approved scripts will run after upgrading to version 12.

Additionally, npm’s earlier introduction of the ‘min-release-age’ setting provides further protection by rejecting any package version published too recently, mitigating the risk from newly released malicious packages.

In conclusion, these updates represent a substantial shift in npm’s security posture, prioritizing developer safety and reducing the risk of supply chain attacks. As software development increasingly relies on open-source components, such proactive measures are critical to maintaining secure digital infrastructures.

The Hacker News Tags:code execution, developer security, GitHub, lifecycle scripts, Node.js, NPM, npm install, npm update, Security, software development, software supply chain, supply chain attacks

Post navigation

Previous Post: Critical Flaw in Splunk Enterprise Enables Unauthorized Code Execution
Next Post: China-Linked JDY Botnet Expands to Over 1,500 Devices

Related Posts

AsyncAPI npm Packages Compromise Sparks Botnet Concerns AsyncAPI npm Packages Compromise Sparks Botnet Concerns The Hacker News
Chinese Hackers RedNovember Target Global Governments Using Pantegana and Cobalt Strike Chinese Hackers RedNovember Target Global Governments Using Pantegana and Cobalt Strike The Hacker News
New Pixnapping Android Flaw Lets Rogue Apps Steal 2FA Codes Without Permissions New Pixnapping Android Flaw Lets Rogue Apps Steal 2FA Codes Without Permissions The Hacker News
Managing Shadow AI Tools Efficiently in the Workplace Managing Shadow AI Tools Efficiently in the Workplace The Hacker News
North Korean Group Linked to Axios npm Attack North Korean Group Linked to Axios npm Attack The Hacker News
Unpatched Ubuntu Bug Allows Host-Root Container Escape Unpatched Ubuntu Bug Allows Host-Root Container Escape The Hacker News

Categories

  • Cyber Security News
  • How To?
  • Security Week News
  • The Hacker News

Recent Posts

  • Hackers Exploit Claude’s Site and Ads for Malware Spread
  • Apache Camel Resolves Critical Vulnerabilities
  • Exploit Targets WordPress Admin Sessions with PHP Backdoor
  • Cybersecurity Breach Disrupts New Mexico Hospital Operations
  • Cloudflare Updates WAF Rules Amid Brotli Vulnerability

Pages

  • About Us – Contact
  • Disclaimer
  • Privacy Policy
  • Terms and Rules

Archives

  • October 2026
  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025

Recent Posts

  • Hackers Exploit Claude’s Site and Ads for Malware Spread
  • Apache Camel Resolves Critical Vulnerabilities
  • Exploit Targets WordPress Admin Sessions with PHP Backdoor
  • Cybersecurity Breach Disrupts New Mexico Hospital Operations
  • Cloudflare Updates WAF Rules Amid Brotli Vulnerability

Pages

  • About Us – Contact
  • Disclaimer
  • Privacy Policy
  • Terms and Rules

Categories

  • Cyber Security News
  • How To?
  • Security Week News
  • The Hacker News

Copyright © 2026 Cyber Web Spider Blog – News.

Powered by PressBook Masonry Dark