Malicious npm packages abuse dependency confusion to profile developer environments
A threat actor published malicious npm packages using dependency confusion to impersonate internal corporate packages and deploy a reconnaissance payload.
Overview
Microsoft Threat IntelligenceCollected evidence about attacker groups, their tools, and the servers or domains they use found an active supply chain attackBreaking into a software maker or vendor so their trusted product or update infects their customers where malicious npm packagesA reusable web code library published to the public npm registry for developers to install were registered under names that mimic real internal corporate namespacesA named boundary that keeps variable names, package names, or container resources separate from each other. This technique, called dependencyAn external code library or package that a software project relies on to do part of its work confusion, allows attackers to deploy an obfuscatedScrambling or tangling code on purpose so humans and security scanners have a hard time reading it reconnaissanceThe scouting phase where an attacker gathers details about a target's servers, software, and staff before striking payloadThe part of an attack or malware file that carries out the harmful action on the target that runs silently during the standard installation process. The threat actorA person or group that carries out cyberattacks, whether for money, spying, or disruption used three maintainerThe developer or small team responsible for reviewing changes and publishing releases for an open-source project aliases to publish these packages across nine different organizational scopes between May 28 and May 29, 2026. Once installed, the packages connect to an attacker-controlled serverA computer or program on a network that stores data and responds to requests from client devices to collect system information, hostnamesThe human-readable label assigned to a computer or server on a local network or the internet, and environment variables. The payload is designed to gather data now and potentially enable full exploitation later through a server-side toggle. The npm team removed the malicious repositories and user accounts after receiving feedback from the investigation.
Terms in this story
- Threat Intelligence
- Collected evidence about attacker groups, their tools, and the servers or domains they use. Security teams share threat intelligence such as known malicious IP addresses and file hashes so other organizations can block the same attack before it hits them. Security+ objective 4.3 lists the term
- supply chain attack
- Breaking into a software maker or vendor so their trusted product or update infects their customers. Instead of attacking a hundred companies one by one, an intruder compromises a single software library or update server that all of those companies already trust. Security+ objective 2.2 lists the term
- npm packages
- A reusable web code library published to the public npm registry for developers to install. Web developers pull in dozens of npm packages when building a site, and attackers frequently publish malicious packages with lookalike names to steal developer credentials during installation. Security+ objective 2.2 lists the term
- namespaces
- A named boundary that keeps variable names, package names, or container resources separate from each other. Operating systems use namespaces to isolate containers so a program inside one container sees only its own files and processes, not those of the host server.
- dependency
- An external code library or package that a software project relies on to do part of its work. When a popular open-source dependency has a security bug or gets hijacked by an attacker, every application that imports that package inherits the risk.
- obfuscated
- Scrambling or tangling code on purpose so humans and security scanners have a hard time reading it. Attackers use obfuscation by renaming variables to gibberish, splitting strings, and wrapping scripts in layers of encoding so analysts cannot easily see what the program does. Security+ objective 1.4 lists the term
- reconnaissance
- The scouting phase where an attacker gathers details about a target's servers, software, and staff before striking. Before attempting a break-in, an intruder performs reconnaissance by scanning public IP addresses, reading job postings to see what software a company uses, and collecting employee email addresses. Security+ objective 5.5 lists the term
- payload
- The part of an attack or malware file that carries out the harmful action on the target. A phishing email and an exploit are only the delivery steps, while the payload is the ransomware or spyware that actually runs once the computer is compromised.
- threat actor
- A person or group that carries out cyberattacks, whether for money, spying, or disruption. Security researchers use the term threat actor to refer to a criminal gang, state spy unit, or solo hacker behind a series of intrusions. Security+ objective 2.1 lists the term
- maintainer
- The developer or small team responsible for reviewing changes and publishing releases for an open-source project. Supply chain attackers often target a volunteer maintainer with phishing emails or offers to help, hoping to gain publishing rights over a popular code library.
- server
- A computer or program on a network that stores data and responds to requests from client devices. Online stores, email systems, and multiplayer games all run on servers in data centers or the cloud, making unpatched servers a primary target for intruders.
- hostnames
- The human-readable label assigned to a computer or server on a local network or the internet. During an intrusion investigation, logs often identify which employee laptop or internal server was accessed by its hostname alongside its IP address.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the Microsoft Security Blog website. Cite the article, not this page.
Read the full article on Microsoft Security Blog (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Research and reports
"Microsoft Threat Intelligence has uncovered an active supply chain attack..." Found by reading the article; these exact words are in it - Who is affected: "...developer environments..."
Copied word for word from the article - Security+ 2.2 Explain common threat vectors and attack surfaces.
"Malicious npm packages abuse dependency confusion to profile developer environments..." Found in the headline - Security+ 5.5 Explain types and purposes of audits and assessments.
"......leveraged 33 malicious npm packages to collect reconnaissance data from developer and build environments. This..." Found in the opening sentences - CYBR 101 week 11: penetration testing, OSINT, MITRE ATT&CK and hacking back
"......leveraged 33 malicious npm packages to collect reconnaissance data from developer and build environments. This..." Found in the opening sentences - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"......details the attack chain, observed tradecraft, and detection opportunities to help organizations identify and disrupt..." Found in the opening sentences
How a story is connected to the course, and every objective, week and job role