Duke u ngarkuar…
  • September 21, 2026
  • Nga aOneITForce

Runtime npm Malware Slips Past Install-Time Supply Chain Defenses

Runtime npm Malware Slips Past Install-Time Supply Chain Defenses

<p>A malicious npm campaign has exposed an important weakness in modern software supply chain defenses: a package can appear harmless during installation while reserving its malicious behavior for application runtime. Researchers examining the indexed-btree package found that its loader was embedded inside a commonly used library method rather than a preinstall, install or postinstall script. This design allowed the package to avoid the approval mechanisms introduced in npm 12 for potentially dangerous lifecycle activity. ([bleepingcomputer.com](https://www.bleepingcomputer.com/news/security/malicious-npm-packages-evade-install-script-defenses-at-runtime/))</p><h2>Normal Execution Becomes the Trigger</h2><p>The package attempted to imitate the legitimate sorted-btree project. Its malicious loader was placed inside the BTree.prototype.set() method, meaning the hostile code could run when an application performed what appeared to be a normal data operation. Installation therefore produced few of the signals that defenders traditionally associate with a compromised dependency.</p><p>Once activated, the malware collected system information and communicated through Slack and Telegram channels. It also retrieved command-and-control information from an Ethereum smart contract on the Sepolia test network, then used encrypted communications to obtain a second-stage payload. Researchers connected nine additional npm packages to the same operation and reported that those packages had accumulated substantial download counts before removal. ([bleepingcomputer.com](https://www.bleepingcomputer.com/news/security/malicious-npm-packages-evade-install-script-defenses-at-runtime/))</p><h2>Why Existing Controls Fall Short</h2><p>Blocking lifecycle scripts remains useful, but this incident demonstrates that it cannot be treated as a complete supply chain security strategy. Static analysis may also struggle when malicious logic is heavily obfuscated, conditionally activated or mixed into a function that developers expect the library to execute frequently.</p><p>In my view, development teams need to treat third-party packages as executable external code throughout their lifetime, not merely during installation. A dependency that passes an initial scan can still activate later in a build server, developer workstation or production workload.</p><h3>Recommended Defensive Actions</h3><ul><li>Remove the identified packages and rebuild affected development environments from trusted images.</li><li>Rotate repository tokens, cloud credentials, signing keys and other secrets accessible to exposed systems.</li><li>Monitor dependencies at runtime for unusual processes, outbound connections and access to credential stores.</li><li>Use lockfiles, internal package mirrors and approved dependency lists to reduce uncontrolled adoption.</li><li>Review package maintainers, release history and code changes instead of relying only on download statistics.</li></ul><p>The broader lesson is that supply chain protection must extend beyond package installation. Runtime behavior, network telemetry and secret-access monitoring are becoming essential controls as attackers learn to make malicious dependencies look clean at the point where most security checks occur.</p>

Kthehu lart