
A self-replicating supply chain worm is actively spreading across the npm registry, and it's bypassing the security checks most teams rely on. Unlike previous npm attacks that injected malicious code into package.json lifecycle hooks, this one hides in a file called binding.gyp - a native build descriptor that most security tools don't monitor. The malware doesn't just steal credentials. It uses them to poison other packages, inject itself into CI/CD pipelines, and spread to every maintainer it can reach.
On June 3, 2026, security researchers at StepSecurity identified an active, self-replicating worm spreading across the npm registry. The attack exploits binding.gyp, a file used to signal that a package contains native C++ code. When npmencounters a binding.gyp file, it automatically invokes node-gyp, which then executes shell commands embedded in the file's sources array. The attacker uses this to silently run a 4.5–4.9 MB obfuscated payload during npm install, without ever touching package.json lifecycle hooks.
Most npm supply chain defenses, including npm audit, standard code review, and many SAST tools, focus on preinstall and postinstall hooks in package.json. This attack skips all of that. The malicious binding.gyp file is only 157 bytes. The package.json shows only legitimate build commands. There is no postinstall hook.
The three-stage payload works as follows:
Beyond stealing credentials, the worm injects persistent backdoor files into repositories it has write access to via stolen GitHub tokens. These files are designed to execute automatically when a developer opens the project in their ID
The files are committed with the message "This is required for proper IDE integration and dependency setup" to appear legitimate and are executed via the downloaded Bun runtime rather than Node.js to evade security tooling that monitors Node process trees.
This makes the attack particularly dangerous: rather than just compromising credentials, it poisons the tools generating code. A back-doored AI assistant configuration can influence subsequent code generation across the entire project, potentially introducing subtle vulnerabilities into code that appears to be developer-written.
The worm targets credentials across virtually every service a developer might have configured:
Stolen credentials are encrypted with a hardcoded RSA public key and exfiltrated as dangling commits — commits not reachable from any branch — making them difficult to discover through normal repository browsing.
This isn't a point compromise. Once credentials are harvested, the worm:
As of June 4, 2026, dozens of packages across multiple maintainer accounts have been compromised. The list includes packages from the autotel, awaitly, executable-stories, node-env-resolver, and @vapi-ai namespaces, among others. Researchers are continuing to identify additional affected packages.
As soon as this attack was confirmed, Arnica deployed detection rules across customer environments to flag any use of compromised package versions. Our security team is actively tracking the worm's propagation and will continue updating findings as new affected packages are identified.
The binding.gyp worm exploits a gap that existed long before this specific attack: package managers that install whatever the registry serves, the moment it's published. Attackers know this. They count on it.
Two things you can do right now:

The binding.gyp technique will evolve. The next variant will find a different blind spot. What changes the outcome isn't faster manual review; it's having detection and prevention already in place before the advisory drops.
Integrate Arnica ChatOps with your development workflow to eliminate risks before they ever reach production.