Malicious npm Packages Stealing Developer Credentials Across Platforms
Supply Chain Risk · 9 sources · Updated 5mo ago · First seen Oct 29, 2025

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.
Why it matters
Impact assessment
PhantomRaven is a cross-platform software supply chain threat affecting developers, build systems, and organizations that consume npm packages on Windows, macOS, and Linux. The primary impact is credential theft from developer workstations and CI/CD environments, creating direct risk of source-code compromise, malicious package publication, cloud account abuse, and downstream supply chain intrusion.
The exposure is broad rather than narrowly targeted: 126 malicious npm packages were published, they accumulated more than 86,000 installs, and more than 80 packages reportedly remained live at disclosure. Researchers described active exploitation in the wild since at least August 2025.
Supporting facts
- Affected populations:
- Software developers using npm
- CI/CD and build environments
- Organizations relying on Node.js/npm dependencies
- Affected platforms:
- Windows
- macOS
- Linux
- Severity drivers:
- Theft of npm tokens, GitHub credentials, GitLab credentials, Jenkins auth data, CircleCI tokens, cloud credentials, SSH keys, and environment secrets
- Potential follow-on abuse includes malicious code insertion into legitimate projects, package hijacking, and broader supply chain compromise
- Malware also harvested host profiling data including public IP, hostname, OS details, usernames, directories, and Node.js version
- Scope indicators:
- 126 malicious npm packages
- More than 86,000 installs/downloads reported
- At least 80 packages still active at time of disclosure
- Campaign active since at least August 2025
- Known incidents:
- Multiple references describe this as an active campaign with real-world installs and credential theft
- Researchers observed suspicious outbound requests during package installation and tied them to attacker infrastructure


