GitHub finally pulls the plug on automatic install script execution
Key Facts
- Attacks likely to move elsewhere Sonu Kapoor, maintainer for CVE Lite CLI in the OWASP Incubator Project, said that this change is likely to force the supply chain attacks that leveraged the automatic execution to move elsewhere.
- The changes, currently available as opt-in warnings in npm version 11.16.0 and later, are expected to become the default behavior […] The post GitHub Introduces Automatic Controls to Prevent Malicious npm Install Scripts appeared first on GBHackers Security | #1 Globally Trusted Cyber Security News Platform.
- This includes malicious preinstall/postinstall script campaigns targeting eslint-config-prettier, Toptal's Picasso packages, dozens of data-stealing npm packages, as well as Git dependency abuse documented in Shai-Hulud attacks.
- Having developers explicitly approve which packages can run code and commit that list to source control is a form of software supply chain governance that many organizations never had,” Levine said.
- GitHub has announced that npm v12, expected next month, will introduce several security-focused changes aimed at blocking supply-chain attacks abusing behaviors triggered by the 'npm install' command.
- The main theme of the announcement is that code execution and non-registry dependency sources that currently trigger automatically during npm install will now require explicit approval instead of being trusted by default.
- GitHub recommends that developers prepare by upgrading to npm 11.16.0 or newer, which displays warnings on all actions that will break under version 12.
- Test every layer before attackers do Security teams log 54% of successful attacks and alert on just 14%.
- GitHub recommends that developers prepare for these changes by upgrading to npm 11.16.0 or newer, running the normal install, and reviewing the warnings displayed.
- Anything you leave unapproved will stop." Earlier this year, npm also introduced "min-release-age," a setting that tells npm to reject any package version published less than a specified number of days as a safeguard against newly published malicious packages.
Attacks likely to move elsewhere Sonu Kapoor, maintainer for CVE Lite CLI in the OWASP Incubator Project, said that this change is likely to force the supply chain attacks that leveraged the automatic execution to move elsewhere. The changes, currently available as opt-in warnings in npm version 11.16.0 and later, are expected to become the default behavior […] The post GitHub Introduces Automatic Controls to Prevent Malicious npm Install Scripts appeared first on GBHackers Security | #1 Globally Trusted Cyber Security News Platform.
What Happened
This includes malicious preinstall/postinstall script campaigns targeting eslint-config-prettier, Toptal’s Picasso packages, dozens of data-stealing npm packages, as well as Git dependency abuse documented in Shai-Hulud attacks.
Further details indicate that having developers explicitly approve which packages can run code and commit that list to source control is a form of software supply chain governance that many organizations never had,” Levine said.
GitHub has announced that npm v12, expected next month, will introduce several security-focused changes aimed at blocking supply-chain attacks abusing behaviors triggered by the ‘npm install’ command.
The main theme of the announcement is that code execution and non-registry dependency sources that currently trigger automatically during npm install will now require explicit approval instead of being trusted by default.
” coming to npm version 12, one of which turns off install scripts by default to combat software supply chain threats. The changes aim to combat attack techniques that abuse the ”, Spokesperson
Scope
This allows developers running their normal install routines to review these warnings and identify dependencies or workflows that will require explicit approval before upgrading. GitHub recommends that developers prepare for these changes by upgrading to npm 11.16.0 or newer, running the normal install, and reviewing the warnings displayed. “After that, only the scripts you approved keep running once you upgrade.
For Defenders
-
GitHub has announced that npm v12, expected next month, will introduce several security-focused changes aimed at blocking supply-chain attacks abusing behaviors triggered by the ‘npm install’ command.
-
Developers execute it after cloning a project, pulling updates, or during CI/CD builds, and attackers target it because of the potential for automated code execution during package installation.
-
GitHub says this removes a code execution path where a Git dependency’s .npmrc file could alter which Git executable is used, even when install scripts are disabled.
-
GitHub recommends that developers prepare by upgrading to npm 11.16.0 or newer, which displays warnings on all actions that will break under version 12.
-
By blocking such behaviours, the idea is to require explicit user approval before code execution is initiated automatically during “npm install” as opposed to being trusted by default.
-
“Use npm approve-scripts —allow-scripts-pending to see which packages have scripts, approve the ones you trust, and commit the updated package.json,” it added.
Takeaway
Organizations should review their exposure and apply available mitigations promptly.
Security teams should monitor vendor advisories and threat intelligence sources closely for additional context or updates. Organizations with mature security programs are advised to incorporate this intelligence into their regular risk assessments and prioritize response activities based on exposure and asset criticality. For environments where immediate remediation is not feasible, compensating controls such as network segmentation, enhanced monitoring, and access restrictions should be evaluated. Security leadership should communicate relevant details to operational teams and ensure that incident response capabilities are prepared if exploitation is observed in the wild.
Sources
- https://github.com/orgs/community/discussions/198547
- https://www.bleepingcomputer.com/news/security/github-announces-npm-security-changes-to-tackle-supply-chain-attacks/
- https://thehackernews.com/2026/06/github-to-disable-npm-install-scripts.html
- https://www.csoonline.com/article/4183859/github-finally-pulls-the-plug-on-automatic-install-script-execution-for-npm-2.html
- https://gbhackers.com/github-introduces-automatic-controls-to-prevent-malicious-npm/
Sources & References
- Preparing for npm v12: install scripts and non-registry sources become opt-in · community · Discussion #198547 · GitHub. Primary github release. https://github.com/orgs/community/discussions/198547
- Source referenced in coverage https://www.bleepingcomputer.com/news/security/github-announces-npm-security-changes-to-tackle-supply-chain-attacks/
- Source referenced in coverage https://thehackernews.com/2026/06/github-to-disable-npm-install-scripts.html
- Source referenced in coverage https://www.csoonline.com/article/4183859/github-finally-pulls-the-plug-on-automatic-install-script-execution-for-npm-2.html
- Source referenced in coverage https://gbhackers.com/github-introduces-automatic-controls-to-prevent-malicious-npm/
SecurityXP delivers daily cybersecurity news, vulnerability analysis, data breach reports, and threat intelligence.
Security Digest
Get the latest cybersecurity news, vulnerability alerts, and threat intelligence delivered to your inbox.
Related Articles
AutoJack Attack Lets One Web Page Hijack AI Agent for Host Code Execution Vulnerability
Microsoft made a similar localhost argument in its Semantic Kernel RCE research, tracked as CVE-2026-26030 and CVE-2026-25592. The issue is tracked as...
Vulnerabilities & ExploitsHitachi Energy e-mesh EMS Vulnerability (CVE-2026-42945)
The following versions of Hitachi Energy e-mesh EMS are affected: - Hitachi Energy e-mesh EMS 4.1.6, 4.4.2, 4.7.0 Background - Critical Infrastructure...
Vulnerabilities & ExploitsCritical Gitea Flaw Under Active Exploitation, Researchers Warn Vulnerability (CVE-2026-20896)
Specific to Gitea’s official Docker images, the critical-severity security defect is tracked as CVE-2026-20896 (CVSS score of 9.8) and can be exploited with...
Vulnerabilities & ExploitsCritical Adobe ColdFusion Vulnerability Exploited in Attacks (CVE-2026-48282)
However, according to the vulnerability intelligence platform KEVIntel, hackers began exploiting CVE-2026-48282 within two hours of its public disclosure...