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

Lazarus Group Targets npm and PyPI with Malicious Packages Lazarus Group Targets npm and PyPI with Malicious Packages The Hacker News
Researchers Uncover BankBot-YNRK and DeliveryRAT Android Trojans Stealing Financial Data Researchers Uncover BankBot-YNRK and DeliveryRAT Android Trojans Stealing Financial Data The Hacker News
SEO Poisoning Campaign Targets 8,500+ SMB Users with Malware Disguised as AI Tools SEO Poisoning Campaign Targets 8,500+ SMB Users with Malware Disguised as AI Tools The Hacker News
Cisco Fixes Critical Flaws in Identity and Webex Services Cisco Fixes Critical Flaws in Identity and Webex Services The Hacker News
Google Fixes Android Flaw (CVE-2025-27363) Exploited by Attackers Google Fixes Android Flaw (CVE-2025-27363) Exploited by Attackers The Hacker News
Salesforce Experience Cloud Faces Security Threats Salesforce Experience Cloud Faces Security Threats The Hacker News

Categories

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

Recent Posts

  • Critical Flaw in CSF on cPanel Allows Remote Command Execution
  • Ubuntu 24.04.5 LTS Launches with Linux 7.0 Kernel
  • Android Malware Combines Ransomware with Espionage
  • Anthropic Uncovers Large-Scale Distillation Attacks by Chinese AI Labs
  • Hackers Exploit CEO Identity in Major Email Scam

Pages

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

Archives

  • 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

  • Critical Flaw in CSF on cPanel Allows Remote Command Execution
  • Ubuntu 24.04.5 LTS Launches with Linux 7.0 Kernel
  • Android Malware Combines Ransomware with Espionage
  • Anthropic Uncovers Large-Scale Distillation Attacks by Chinese AI Labs
  • Hackers Exploit CEO Identity in Major Email Scam

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