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

36 Malicious npm Packages Exploit Databases for Persistent Access 36 Malicious npm Packages Exploit Databases for Persistent Access The Hacker News
Critical 7-Zip Vulnerability Enables Code Execution Critical 7-Zip Vulnerability Enables Code Execution The Hacker News
New Android Malware Surge Hits Devices via Overlays, Virtualization Fraud and NFC Theft New Android Malware Surge Hits Devices via Overlays, Virtualization Fraud and NFC Theft The Hacker News
The High (and Hidden) Costs for Cloud-First Businesses The High (and Hidden) Costs for Cloud-First Businesses The Hacker News
New U.S. Visa Rule Requires Applicants to Set Social Media Account Privacy to Public New U.S. Visa Rule Requires Applicants to Set Social Media Account Privacy to Public The Hacker News
Chrome 0-Day, AI Hacking Tools, DDR5 Bit-Flips, npm Worm & More Chrome 0-Day, AI Hacking Tools, DDR5 Bit-Flips, npm Worm & More The Hacker News

Categories

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

Recent Posts

  • Critical Security Update for JetBrains TeamCity Users
  • AI Uncovers Cryptographic Flaws Overlooked by Experts
  • Claude AI Unveils Breakthrough in Cryptanalysis
  • Google Ads Misused to Spread MacSync Infostealer via Fake Claude Guide
  • Apple’s iOS 26.6 Patch Secures Against Critical Vulnerabilities

Pages

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

Archives

  • 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

  • Critical Security Update for JetBrains TeamCity Users
  • AI Uncovers Cryptographic Flaws Overlooked by Experts
  • Claude AI Unveils Breakthrough in Cryptanalysis
  • Google Ads Misused to Spread MacSync Infostealer via Fake Claude Guide
  • Apple’s iOS 26.6 Patch Secures Against Critical Vulnerabilities

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