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

npm Dependency Confusion Attack Targets Developer Environments

Microsoft Threat Intelligence uncovered 33 malicious npm packages that abused dependency confusion to impersonate internal corporate packages and silently profile developer systems during installation. The campaign matters because it targets developer workstations and CI/CD environments, creating a foothold for potential follow-on supply chain attacks.

Security

Microsoft Defender Named a 2026 Endpoint Leader

Microsoft says it has been named a Leader in the 2026 Gartner Magic Quadrant for Endpoint Protection for the seventh consecutive time. The announcement highlights recent Microsoft Defender for Endpoint enhancements, including attack disruption, custom telemetry, simplified onboarding, sovereign-ready deployment options, and protection for local AI agents.

Security

The Gentlemen Ransomware: Self-Propagating Go Threat

Microsoft Threat Intelligence has published a deep technical analysis of The Gentlemen ransomware, a Go-based ransomware-as-a-service threat that combines strong file encryption with aggressive self-propagation. The research matters for defenders because the malware can rapidly spread across local systems and network shares, increasing the blast radius of a single compromise.

Security

Cryptojacking Campaign Abuses ScreenConnect and .NET

Microsoft has detailed an active cryptojacking campaign that uses poisoned search results and AI chatbot recommendations to lure users to fake software download sites. The attack abuses DLL sideloading, ScreenConnect, and Microsoft .NET utilities to gain persistent access and mine cryptocurrency on high-GPU systems, raising the risk of follow-on activity such as data theft or ransomware.

Security

Microsoft Security AI Foundations: Customer Success

Microsoft highlighted how St. Luke’s and ManpowerGroup are building AI-ready security foundations with Microsoft Security, Microsoft Sentinel, Microsoft Defender, and Security Copilot. The stories show why unified visibility, automation, and Zero Trust controls are becoming essential for organizations that want to scale AI without increasing risk.

Security

Microsoft Entra Leads Forrester Identity Security 2026

Microsoft has been named a Leader in The Forrester Wave for Workforce Identity Security Platforms, Q2 2026, earning the highest scores in both current offering and strategy. The recognition highlights growing demand for unified identity, access, and response capabilities as organizations manage more human, machine, and AI-driven identities.