The Microsoft Security team has exposed an ongoing software supply chain attack targeting developers through the npm package registry. A threat actor, operating under the alias 'vpmdhaj', published 14 malicious packages that typosquat popular libraries in the OpenSearch and DevOps ecosystems. The attack, which unfolded on May 28, 2026, uses a preinstall script in the package.json file to automatically execute a malicious payload upon installation. The ultimate goal is to harvest a wide array of sensitive developer secrets from the compromised environment. This includes credentials for Amazon Web Services (AWS), tokens for HashiCorp Vault, and secrets from CI/CD environments, posing a severe risk to organizational cloud infrastructure and the integrity of the software supply chain.
This campaign is a classic example of a typosquatting attack, where attackers publish packages with names very similar to popular, legitimate ones, hoping developers will mistype the name and install the malicious version.
a39155771@gmail[.]com.preinstall hook in the package.json file. This is a highly effective technique because the script runs automatically before the package installation even completes, requiring no further user interaction.The theft of an npm publish token is particularly dangerous, as it would allow the attacker to publish malicious versions of any packages maintained by the compromised developer, dramatically expanding the scope of the supply chain attack.
The attack is simple but effective, exploiting the trust and speed inherent in modern development workflows.
opensearch-client instead of @opensearch-project/opensearch). This is a form of social engineering, mapping to T1566 - Phishing.npm install <typosquatted-package>. This action downloads and triggers the malicious preinstall hook. This is a direct example of T1195.002 - Compromise Software Supply Chain.preinstall script runs, executing code on the developer's machine with the permissions of the current user. This maps to T1059.007 - JavaScript.~/.aws/credentials, environment variables (AWS_ACCESS_KEY_ID), and other configuration files. This is a clear case of T1552.004 - Private Keys and T1555 - Credentials from Password Stores.T1048 - Exfiltration Over Alternative Protocol.Compromising a developer's machine with this type of malware can have catastrophic consequences for an organization.
a39155771@gmail[.]comNote: The 14 malicious package names were not listed in the provided summaries but would be critical IOCs.
To detect this type of threat, security teams should monitor their development and CI/CD environments for:
package.jsonpreinstall or postinstall scripts that execute suspicious commands or download external files.bun.exenpm installnpm install command. The npm process should not be spawning network connections to unknown domains or executing arbitrary scripts from temp directories.npm audit can identify some issues, but third-party Software Composition Analysis (SCA) tools are more effective at detecting malicious packages and suspicious script hooks.@my-org/mypackage) which are harder to typosquat. For internal packages, host them on a private npm registry. This aligns with M1033 - Limit Software Installation.npm install with the --ignore-scripts flag to prevent preinstall and postinstall hooks from running automatically. You can then review the scripts before manually running them if necessary.Use a private package registry or proxy to maintain an allowlist of vetted, approved open-source packages for developers to use.
Integrate dependency scanning tools into the CI/CD pipeline to automatically audit for malicious or vulnerable packages before they are built into production code.
In the context of an npm typosquatting attack, System File Analysis translates to automated analysis of package manifests and lock files. Organizations must integrate Software Composition Analysis (SCA) tools directly into their CI/CD pipelines. These tools should be configured to scan every package.json and package-lock.json file on every commit or pull request. The analysis should specifically look for high-risk indicators: the presence of preinstall or postinstall scripts, packages from unknown or untrusted publishers, or packages with names that are a close match to popular libraries (typosquatting detection). A critical rule should be to fail the build automatically if a preinstall script is detected in a new or non-allowlisted dependency. This automated gatekeeping prevents a developer from accidentally introducing a malicious package into the codebase, effectively analyzing the 'system files' of the software project to prevent compromise.
Hardening the configuration of the npm client itself is a powerful mitigation. Developers and CI/CD environments should be configured to run npm with security-first settings. This can be enforced via a .npmrc file in the project root. The most important setting is ignore-scripts=true. This single configuration change prevents the automatic execution of preinstall and postinstall hooks, which is the primary execution vector for this type of attack. While this may break some legitimate packages that rely on these scripts, it forces a deliberate, manual review process for any package that requires a build step. This shifts the default from 'trust and execute' to 'distrust and verify,' which is the correct security posture when dealing with open-source dependencies. This hardening technique directly neutralizes the attack mechanism used by the 'vpmdhaj' actor.
Threat actor 'vpmdhaj' publishes 14 malicious packages to npm within a four-hour window.
Microsoft Security team reports the discovery of the campaign.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.