TL;DR: A single npm operator published five trojanized packages across two rounds in three days, then relaunched the campaign 74 minutes after takedown using the same command-and-control infrastructure, according to Xygeni. Import-time execution bypasses install-hook scanning and shifts supply-chain defense toward dependency review, runtime egress control, and network-based detection.
Editorial analysis by NHI Mgmt Group, based on content published by Xygeni: “GhostTracker: an npm trojan that rebranded within hours of takedown — and kept the same C2”.
Key questions
Q: What breaks when npm security controls only scan install scripts?
A: They miss malicious code that runs at import time inside normal module initialisation.
Q: Why do import-time npm trojans create such a persistent risk?
A: They persist because the malicious code is triggered by ordinary package use, not by a special installer hook.
Q: Where do teams usually miss hidden execution in package dependencies?
A: They usually stop at direct dependencies and package metadata, then miss carrier packages and transitive imports that trigger the real payload.
Practitioner guidance
- Audit module-load behaviour in dependency trees Scan packages for top-level exec calls, outbound network calls, and code that runs during require or import, especially in utility modules that appear harmless.
- Block suspicious staging domains and shell patterns Add DNS and egress detections for remote script loaders such as curl piped to sh, and alert on repeat use of the same command-and-control host across package names.
- Review transitive dependencies as potential execution paths Trace carrier packages that exist only to pull in other modules, and treat any dependency chain that imports obscure utilities as high risk until validated.
Bottom line: This campaign shows that npm malware can evade hook-based screening by moving execution from install time to import time.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Import-time execution is the control failure this campaign exposes: the industry has treated npm install hooks as the primary supply-chain inspection point, but that assumption misses module-level code entirely. A dependency can be clean at install and still become active at first import, which is where many build and runtime trust decisions actually happen. Practitioners should move inspection from package metadata alone to the behaviour of code at load time.
A question worth separating out:
A: Treat it as a compromise signal, not as a harmless update check. Isolate the host or pipeline, block the destination at DNS and egress layers, search for the same indicator across lockfiles and logs, and assume the imported code may have executed with the caller's privileges.
👉 Read our full editorial: Import-time npm supply chain malware is bypassing install-hook defenses