Insights
Sep 30, 2025
3
min read

From NPM Backdoors to Worms: Why Immutability Must Be the First Question

Vishal Agarwal

Table of Contents

When news of the NPM backdoor attack broke — targeting packages with more than two billion weekly downloads — my first reaction, as it likely was for many CISOs, was straightforward: Are we exposed? Did our tools alert us?

The instinct is to hand the question to the AppSec team. They scramble through the usual motions: check coverage across repos, run scans, pull in open-source scripts, cross-reference known packages. The results come back clean. A sigh of relief.

But should we really sleep better?

Soon after, the Shai-Hulud worm spread across more than 180 npm packages.

Two Incidents, One Lesson

While different in technique, both incidents reveal the same weakness: attackers exploiting the trust developers place in open ecosystems, while organizations lack the visibility into what they consume.

The AppSec Reflex and Its Limits

Application security tools are critical, but as the recent supply chain attacks demonstrate, they are not sufficient on their own. Their scope ends at the codebase. In today’s ecosystem, code is only one part of the picture.

Indirect dependencies, such as GitHub Actions, CI/CD runners, and third-party services, often slip past AppSec visibility. Even with clean scans, malicious code can creep in later through mutable environments or evolving IOCs.

Supply chain risk: GitHub Actions pulling npm packages (different versions) impacted by backdoor attack

The Real First Question: Is My Estate Immutable?

Instead of starting with “What did our AppSec scan find?”, the better question is: “Is my environment truly immutable?”

If the answer is “not fully,” then drift and invisible dependencies are inevitable. An attacker can change the ground under you, and your clean scan results quickly lose meaning.

Mutable runtime environments allow compromised npm packages to propagate

What Actually Reduces Risk

CISOs need to drive a broader supply chain security strategy that connects AppSec, infrastructure, and operations. Core principles include:

  1. Enforce immutability: Pin base images, lock dependencies, run production as read-only, and use ephemeral CI/CD runners.
  2. Verify, not trust: Adopt checksums and signatures, SBOMs, and provenance attestations (SLSA-style) not just for apps but also for pipelines and third-party actions.
  3. Contain the blast radius: Use private or mirrored registries, least-privilege access, and strong egress controls.
  4. Watch runtime: Maintain EDR and malware scanning with updated IOCs across both build and production systems.

Closing Thought

The NPM hijack and the Shai-Hulud worm may look different in execution, but they highlight the same truth. Supply chain safety cannot be solved by AppSec scans alone. It requires discipline in how environments are built, deployed, and monitored.

The broader lesson here is universal: immutability must be the first question every CISO asks. CISOs who focus first on immutability, ensuring their environments cannot silently shift beneath them, will reduce exposure not just to today’s backdoors but also to tomorrow’s worms and copycat attacks.

Ready to Reduce Cloud Security Noise and Act Faster?

Discover the power of Averlon’s AI-driven insights. Identify and prioritize real threats faster and drive a swift, targeted response to regain control of your cloud. Shrink the time to resolution for critical risk by up to 90%.

CTA image