Security

Typosquatted npm Packages Steal Cloud and CI/CD Secrets

3 min read

Summary

Microsoft has uncovered an active npm supply chain attack in which 14 typosquatted packages stole AWS credentials, HashiCorp Vault tokens, GitHub Actions data, and npm publish tokens during installation. The campaign matters because it targets developer and build environments, creating risk of cloud lateral movement, CI/CD compromise, and downstream software supply chain attacks.

Need help with Security?Talk to an Expert

Introduction

Microsoft has identified a serious npm supply chain campaign that targeted developers and build systems through typosquatted packages. Although the malicious packages have been removed, the techniques used in this attack show how quickly cloud credentials and CI/CD secrets can be exposed during a routine npm install.

For IT and security teams, this is a reminder that package managers remain a high-value attack path, especially in environments with access to AWS, Vault, GitHub Actions, and npm publishing tokens.

What’s new

Microsoft Defender Security Research reported that a single threat actor published 14 malicious npm packages within a four-hour period. These packages impersonated OpenSearch, ElasticSearch, DevOps, and environment configuration libraries.

Key findings include:

  • Typosquatted package names designed to look like legitimate OpenSearch and Elastic-related packages
  • Spoofed repository metadata pointing to the real OpenSearch project to build trust
  • Automatic execution during install via npm preinstall, install, or postinstall hooks
  • Two-stage malware delivery, including a newer variant that abuses the legitimate Bun runtime as a stealthier loader
  • Credential theft targeting:
    • AWS credentials from environment variables, IMDSv2, and ECS task metadata
    • AWS Secrets Manager across more than 16 regions
    • HashiCorp Vault tokens
    • GitHub Actions environment context
    • npm publish tokens for follow-on supply chain attacks

Why this matters for administrators

This attack goes beyond a single compromised workstation. If a malicious package runs inside a CI/CD pipeline or cloud-connected development environment, attackers may gain access to:

  • Cloud accounts and temporary AWS sessions
  • Secrets stored in AWS Secrets Manager
  • Build and deployment pipelines
  • npm maintainer tokens that could be used to publish malicious updates downstream

That creates a much larger blast radius than a typical developer malware incident. A compromised build agent or runner could become the starting point for cloud lateral movement or software supply chain compromise.

Administrators should review development and pipeline environments for exposure and strengthen package controls.

  • Audit npm dependencies for recently installed lookalike packages related to OpenSearch or ElasticSearch
  • Review build logs and proxy logs for suspicious install-time activity, including unusual lifecycle hook execution
  • Hunt for indicators such as requests with the X-Supply: 1 header or unexpected Bun downloads during package installation
  • Rotate exposed secrets immediately, including AWS credentials, Vault tokens, GitHub Actions secrets, and npm publish tokens
  • Restrict package installation sources and consider allowlists for approved registries and packages
  • Enable Defender XDR and advanced hunting to detect suspicious package execution and credential access behavior

Bottom line

This campaign highlights how a simple typo in an npm package name can lead to credential theft across cloud and CI/CD environments. Security teams should treat developer endpoints and build systems as critical assets and apply the same monitoring, secret hygiene, and supply chain protections used elsewhere in the enterprise.

Need help with Security?

Our experts can help you implement and optimize your Microsoft solutions.

Talk to an Expert

Stay updated on Microsoft technologies

npmsupply chain securityCI/CDAWS credentialsMicrosoft Defender

Related Posts

Security

Microsoft Sentinel Named a 2026 SIEM Leader

Microsoft has been named a Leader in the 2026 Gartner Magic Quadrant for SIEM, highlighting the continued momentum behind Microsoft Sentinel. The announcement also underscores Microsoft's push toward integrated, AI-powered security operations through deep Sentinel integration with the new Integrated Security Operations Center in Microsoft Defender.

Security

Microsoft Perception GA: Agentic Security at Ignite

Microsoft has made Microsoft Perception generally available, introducing an agentic security platform that coordinates red, blue, and green team agents through automated playbooks. Announced at Ignite 2026, the update also expands Defender and Sentinel capabilities to help security teams detect, investigate, and remediate AI-speed threats while keeping administrators in control.

Security

Device Code Phishing Risks for AI Coding Agents

Microsoft warns that device code phishing can be used against AI coding agents such as GitHub Copilot CLI, not just user mailboxes or cloud apps. In a controlled lab, a single approved device code sign-in could enable remote session steering, memory poisoning, synced session exposure, and private repository access depending on account permissions and enabled features.

Security

Microsoft 365 Outage Phishing Campaign Targets Users

Microsoft Threat Intelligence reported a high-volume phishing campaign that impersonates Microsoft 365 service-health notifications to trick users into clicking malicious links. The campaign matters because it uses outage-themed urgency and recipient-specific tracking to target multiple industries, increasing the risk of credential theft and follow-on account compromise.

Security

SCKit ScreenConnect Attack: MSPs Must Hunt Now

Microsoft Threat Intelligence confirmed a campaign abusing ConnectWise ScreenConnect to deploy unauthorized remote-access clients and the SCKit worm on MSP-managed endpoints. The activity can also target technician sessions, making this a high-priority incident for defenders because removing a rogue client alone does not eliminate persistence or invalidate exposed sessions.

Security

AI Agent Supply Chain Attacks Target Coding Tools

Microsoft Security researchers detailed two post-training supply chain attack paths that can backdoor coding and terminal agents: dataset poisoning and model poisoning. The findings matter because compromised agents can misuse tools, execute commands, and access sensitive environments even when prompts appear benign, reinforcing the need for stronger controls around training data, model provenance, and tool permissions.