Malicious npm Packages Stealing Developer Credentials Across Platforms
Security researchers have uncovered multiple campaigns involving malicious npm packages designed to steal developer credentials and sensitive information from Windows, macOS, and Linux systems. In one operation, ten typosquatted packages impersonated popular libraries such as TypeScript, discord.js, ethers.js, and others, using sophisticated obfuscation, fake CAPTCHA prompts, and postinstall hooks to deploy an information stealer that harvested credentials from system keyrings, browsers, and authentication services. The malware executed in a new terminal window to evade detection and sent stolen data, including IP addresses, to external servers. Another large-scale campaign, dubbed 'PhantomRaven,' involved 126 npm packages and over 86,000 downloads, targeting authentication tokens, CI/CD secrets, and GitHub credentials. These packages leveraged remote dynamic dependencies to fetch and execute payloads during installation, profiling infected devices and exfiltrating secrets for potential supply chain attacks.
The attackers employed techniques such as slopsquatting, where AI-generated package recommendations led developers to install non-existent, malicious packages. Some packages impersonated tools from GitLab and Apache, and many remained available on npm at the time of reporting. The campaigns highlight the ongoing risks in the npm ecosystem, with attackers exploiting both user trust and platform weaknesses to compromise developer environments and CI/CD pipelines. Security experts warn that the theft of tokens and credentials could enable further attacks, including the introduction of malicious code into legitimate projects and broader supply chain compromises.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
7 events from the most recent confirmed update back to the earliest known activity.
Koi Security publishes IOCs for PhantomRaven hunting
As cleanup began, Koi Security released indicators of compromise to help organizations identify exposure to the PhantomRaven npm supply-chain activity.
npm begins reviewing and removing PhantomRaven packages
Following disclosure, npm's security team was reported to be reviewing and removing the malicious packages from the registry as part of the response to the campaign.
Researchers link PhantomRaven to slopsquatting package names
Koi Security and DCODX said the threat actor appeared to use 'slopsquatting' by registering package names likely to be suggested by hallucinating LLM coding assistants, increasing the chance of developer installation.
Koi Security discloses Remote Dynamic Dependencies technique
Koi Security publicly reported that the packages hid malicious behavior through attacker-hosted Remote Dynamic Dependencies fetched from packages.storeartifact.com, making them appear to have zero dependencies to many scanners while executing via preinstall scripts.
PhantomRaven grows to 126 npm packages and 86,000+ downloads
By late October 2025, researchers reported the campaign had expanded to 126 malicious npm packages with more than 86,000 total downloads, targeting npm tokens, GitHub credentials, CI/CD secrets, and other developer data.
Initial wave of malicious npm packages is removed
Researchers said an initial wave of PhantomRaven packages was removed in August 2025 after appearing on npm, indicating the campaign had already been active before the later larger cluster was identified.
PhantomRaven campaign begins targeting npm
Koi Security assessed that the PhantomRaven software supply-chain campaign started in August 2025, with threat actors publishing malicious npm packages designed to steal developer credentials and secrets.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
9 references tracked. Mallory keeps watching after this page renders.
PhantomRaven: 126 Malicious npm Packages Steal Developer Tokens and Secrets Using Hidden Dependencies
securityonline.info
Open sourceInvisible npm malware pulls a disappearing act – then nicks your tokens
go.theregister.com
Open sourcePhantomRaven Attack Involves 126 Malicious npm Packages with Over 86,000 Downloads Hiding Malicious Code
cybersecuritynews.com
Open sourcePhantomRaven Malware Found in 126 npm Packages Stealing GitHub Tokens From Devs
thehackernews.com
Open sourceMalicious packages in npm evade dependency detection through invisible URL links: Report
csoonline.com
Open sourceNPM flooded with malicious packages downloaded more than 86,000 times
arstechnica.com
Open sourcePhantomRaven attack floods npm with credential-stealing packages
bleepingcomputer.com
Open sourceMalicious NPM Packages Disguised With 'Invisible' Dependencies
darkreading.com
Open sourceNpm Malware Uses Invisible Dependencies to Infect Dozens of Packages
infosecurity-magazine.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


