Detailed execution chain from npm install trigger through CI detection, caching, C2 download, to detached background process spawn | Image: Microsoft
Microsoft Threat Intelligence researchers recently uncovered an active security breach targeting modern software developer pipelines. Specifically, a single threat actor orchestrated a sophisticated npm dependency confusion attack to target prominent corporate environments. This malicious campaign leverages lookalike organizational namespaces to deliver covert reconnaissance payloads. Furthermore, the registry security teams quickly removed the malicious packages discovered during the forensic investigation. Development teams must audit their local configuration environments immediately to prevent structural network compromises.
Inside the Multi-Account Campaign Cluster

The threat actor executed the massive operation across a tight timeframe. To begin with, the adversary operated under three distinct maintainer accounts. These aliases included mr.4nd3r50n, ce-rwb, and t-in-one. In addition, the malicious actor published dozens of rogue packages during two separate publishing bursts on May 28 and May 29, 2026. The official report notes: “The packages impersonate internal corporate packages across nine different organizational scopes using a dependency confusion technique, and several spoof internal enterprise infrastructure URLs (GitHub Enterprise, Jira, documentation portals) in their package.json to appear legitimate.”
Consequently, these spoofed parameters trick developer systems into installing the wrong components. The attacker registered multiple scopes that precisely mirror real internal corporate namespaces. These targeted environments include cloudplatform-single-spa, payments-widget, and sber-ecom-core. Furthermore, the creator used inflated version numbers like 100.100.100 to hijack the package selection process. This high version ranking ensures that the malicious code wins dependency resolution over authentic internal assets.
Mechanics of Lifecycle Hook Abuse
The infection chain activates automatically without requiring explicit manual initialization from the target coder. Specifically, the configuration files declare an automatic install-time script hook within the package details. The malicious program relies heavily on the postinstall lifecycle parameter to gain execution access. Therefore, running a standard installation routine immediately fires up a hidden script named postinstall.js.
This stager consists of approximately seven kilobytes of heavily obfuscated JavaScript. To hide its functionality, the developer applied complex obfuscator.io-style formatting methods. For example, the script uses string array encoding and control flow flattening to derail manual code reviews. In addition, self-defending routines quickly detect any attempts to modify or analyze the file structure.
The Eight-Stage Delivery Pipeline
Subsequently, the deobfuscated stager processes an intricate eight-stage validation routine before downloading the final spy payload. First, the code executes a continuous integration environment check to avoid monitored developer pipelines. If it detects a testing environment, the script aborts its runtime loop silently. Next, the stager verifies the active Node.js layout version to ensure compatibility with modern system calls.
Afterwards, the stager performs cache deduplication to reduce its visible network footprint. It creates a unique local folder path to log prior installations. If a valid cache entry exists, the stager exits the system immediately. This clever check stops the payload from generating repeated network connections. However, if the path remains clear, an HTTPS GET request retrieves the primary payload binary from a remote server.
Two-Phase Architecture and Exploitation Logic
The background binary functions primarily in a reconnaissance configuration. According to the investigation, “The payload runs silently during npm install and operates in ‘reconnaissance-only’ mode, collecting system information, hostnames, environment variables, and developer context.” The attacker coordinates this strategy through a dedicated server-side architecture. Specifically, an environment variable named RECON_ONLY restricts the payload’s current capabilities.
Nevertheless, the structural architecture allows the actor to switch modes remotely at any moment. Toggling the configuration flag initiates full exploitation capabilities. This next phase enables active credential theft, data exfiltration, or secondary backdoor deployment. Ultimately, this two-phase deployment framework lowers the risk of early detection while gathering a high-value target inventory.
Attributing the Shared Infrastructure
Forensic metadata analysis links the three separate maintainer accounts to a single operator. The strongest technical connection involves an identical cryptographic token embedded inside every outbound transmission. Specifically, every package passes a hardcoded authentication sequence as a custom HTTP header. The analysis confirms: “The single strongest piece of evidence is a shared hardcoded authentication value, l95HdDaz3kQx1Zsg3WxH6HvKANf51RY1, sent as the X-Secret HTTP header on every outbound C2 request from every package in all three accounts.”
In addition, historical registry trails reveal the attacker’s technical evolution. The operator originally registered packages as a legitimate bug bounty researcher in April 2024. However, the individual transitioned into deploying active malware two years later. This clear correlation suggests that the operator weaponized old testing methodologies to launch this modern npm dependency confusion attack.
Mandatory Mitigation Steps for Defenders
Microsoft advises software teams to implement immediate hardening controls to neutralize the digital hazard. Security teams should inspect all package lockfiles for signs of unauthorized scopes. Furthermore, administrators can disable script hooks completely by passing specific parameters during builds. The report recommends: “Disable pre- and post-installation script execution by ensuring you run npm install with ignore-scripts (or by setting npm config set ignore-scripts true globally).” Finally, engineers must block network access to the rogue server domain oob.moika.tech immediately.
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.