Normal view

Received before yesterday

New Shai-Hulud Attack Hits Nearly 500 npm Packages with 100+ Million Downloads

24 November 2025 at 15:29

New Shai-Hulud Attack Hits Nearly 500 npm Packages with 100+ Million Downloads

A new Shai-Hulud supply chain attack has hit nearly 500 npm packages with a total of 132 million monthly downloads. The latest campaign follows one in September that infected nearly 200 npm packages with more than 2 billion weekly downloads. The new campaign targeting the packages used to run JavaScript outside of a browser was reported by Aikido and other security firms. Aikido noted that a total of 492 packages have been affected by the self-replicating worm, and more than 25,000 compromised repositories labeled “Sha1-Hulud: The Second Coming” have been created containing sensitive information like passwords, API keys, cloud tokens, and GitHub or npm credentials. “The timing is notable, given npm’s recent announcement that it will revoke classic tokens on December 9 after the wave of supply-chain attacks,” Aikido’s Charlie Eriksen said. “With many users still not migrated to trusted publishing, the attacker seized the moment for one more hit before npm’s deadline.”

Shai-Hulud Attack Affects Packages from Zapier, AsyncAPI and Others

Shai-Hulud, named after the giant sandworms from Dune, is a self-replicating npm worm built to spread quickly through compromised developer environments. The latest attack has hit major npm packages from the likes of Zapier, ENS, AsyncAPI, PostHog, Browserbase, and Postman. “Once it infects a system, it searches for exposed secrets such as API keys and tokens using TruffleHog and publishes anything it finds to a public GitHub repository,” Eriksen said. “It then attempts to push new copies of itself to npm, helping it propagate across the ecosystem, while exfiltrating data back to the attacker.” If a developer installs one of these malcicious packages, the malware runs quietly during installation before anything even finishes installing, giving the malware access to the developer’s machine, build systems, or cloud environment, he said. If stolen secrets include access to code repositories or package registries, attackers can use those secrets to break into additional accounts and publish more malicious packages, spreading the attack even further. “Because trusted ecosystems were involved and millions of downloads are affected, any team using NPM should immediately check whether they were impacted and rotate any credentials that may have leaked,” Eriksen said.

Shai-Hulud Worm Details

Ashish Kurmi of Step Security noted that the latest evolution of the malware “disguises the entire payload as a helpful Bun installer.” The core payload - bun_environment.js - is 10MB and uses “extreme obfuscation techniques,” Kurmi added. These include “a massive hex-encoded string array containing thousands of entries,” an anti-analysis loop “that performs millions of arithmetic operations,” and every string in the code is retrieved through an obfuscated function. The malware delays full execution on developer machines by “forking itself into the background,” Kurmi said. “The user’s terminal returns instantly, giving the illusion of a normal install, while seconds later a completely detached process begins exfiltration.” “It executes a sophisticated, multi-stage pre-install attack that targets both CI/CD runners and developer workstations with equal effectiveness,” Kurmi said. Wiz noted that the malware targets AWS, Azure and Google Cloud Platform (GCP) by “bundling official SDKs to operate independently of host tools.”

JFrog Uncovers Severe React Vulnerability Threat to Software Supply Chains

6 November 2025 at 15:10

The security research team at JFrog, a provider of a platform for building and deploying software, have discovered a critical vulnerability in a node package manager (NPM) found in tools used by application developers that enable unauthenticated attackers to remotely trigger arbitrary operating system commands by sending a post request to a Metro server used..

The post JFrog Uncovers Severe React Vulnerability Threat to Software Supply Chains appeared first on Security Boulevard.

PhantomRaven: npm Malware Evolves Again

Published 3:00 p.m. ET on October 31, 2025; last updated 5:00 p.m. ET on October 31, 2025

This week, an open source malware campaign dubbed ‘PhantomRaven’ has run rampant, flooding the npm registry with over a hundred malicious packages that saw more than 86,000 potential victims before discovery.

The post PhantomRaven: npm Malware Evolves Again appeared first on Security Boulevard.

Malicious Typosquatted npm Packages Deliver Cross-Platform Credential Stealer, Researchers Warn

typosquatted

Security researchers have disclosed a campaign of typosquatted npm packages that automatically execute on install and ultimately deliver a cross-platform credential stealer. According to researchers, the malicious packages were first published on July 4, 2025, remained live for over four months, and together collected more than 9,900 downloads before Socket petitioned the npm registry for removal.  The actor behind the campaign, a registrant using the name andrew_r1 with the email parvlhonor@gmx[.]com, created ten packages whose names mimic legitimate libraries. Socket’s AI Scanner labeled the most prominent malicious package, dizcordjs, as “Known malware.” The full list of Typosquatted packages observed is: 
  • typescriptjs (mimics TypeScript) 
  • deezcord.js, dizcordjs, dezcord.js (mimic discord.js) 
  • etherdjs, ethesjs, ethetsjs (mimic ethers.js) 
  • nodemonjs (mimics nodemon) 
  • react-router-dom.js (mimics react-router-dom) 
  • zustand.js (mimics zustand) 

Typosquatted NPM Packages: Obfuscation and Automatic Execution Techniques

Automatic, immediate execution is central to the operation. Each package abuses npm’s postinstall lifecycle hook so that simply running npm install triggers the malicious payload. Socket extracted an example package.json used by the attacker that runs node install.js in postinstall. The install.js implements platform detection and spawns a separate terminal window on Windows (cmd), Linux (gnome-terminal/x-terminal-emulator), or macOS (Terminal.app via AppleScript). By launching the payload in a new window and clearing it quickly, the malware runs outside the main npm output and reduces the chance the developer notices.  The malicious app.js is heavily obfuscated with four distinct layers designed to defeat static analysis and automated scanners: an eval-based self-decoding wrapper, XOR decryption using a key derived from the decoder function’s own source, URL encoding of the payload string, and control-flow obfuscation implemented with switch/state machines and mixed-base arithmetic. Socket noted that these layers only reveal the real payload at runtime, increasing the difficulty of static inspection. 

Multi-stage credential theft workflow

After installation, the packages perform social engineering: they display a fake CAPTCHA prompt rendered in terminal (via Node’s readline) to simulate legitimate bot protection and to persuade the user that the operation is expected. The installer then prints realistic-looking install messages such as “Installing ethers package...” or “Installing discord.js package...” along with plausible version numbers and contributor counts to further the ruse.  Before delivering the final payload, the malware performs IP fingerprinting: it sends the victim’s IP to the actor’s server at http://195[.]133[.]79[.]43/get_current_ip. Socket observed this behavior in network captures; the actor can use those logs to profile victims, filter by geography, or identify security researchers.  Once the victim interacts with the fake CAPTCHA, the installer downloads a platform-specific binary named data_extracter from http://195[.]133[.]79[.]43/data_extracter and executes it. Socket reported the binary as a 24MB PyInstaller package with hash 80552ce00e5d271da870e96207541a4f82a782e7b7f4690baeca5d411ed71edb and noted more than 289,000 embedded strings—evidence of broad built-in functionality. Because it is packaged with PyInstaller, the binary runs without a separate Python interpreter and is available for Windows, macOS, and Linux.  Socket’s analysis describes the data_extracter as a comprehensive credential stealer that performs recursive file-system scanning (browser profiles, ~/.ssh/~/.aws/credentials~/.kube/config~/.docker/config.json, and application config directories), extracts browser SQLite databases and session cookies, and targets system keyrings (Windows Credential Manager, macOS Keychain, Linux SecretService/libsecret/KWallet). The binary also includes libraries to harvest OAuth and JWT tokens and references to oauthlib and JWT utilities, enabling programmatic access long after passwords are changed. Harvested artifacts are compressed into archives staged in temporary directories (e.g., /var/tmp) and exfiltrated to the C2 at 195[.]133[.]79[.]43. 

Recommendations, IOCs, and impact

Socket characterized the campaign as combining advanced obfuscation, social engineering via fake CAPTCHA and legitimate-looking install messages, IP fingerprinting, and a platform-aware PyInstaller credential stealer—techniques rarely seen together in npm supply chain attacks.  Socket’s immediate recommendations: 
  • Assume any system that installed one of the ten Typosquatted packages is fully compromised. 
  • Remove the malicious packages and petition npm for takedown. 
  • Reset credentials stored in system keyrings and browser password managers; revoke and rotate OAuth, JWT, API keys, and SSH keys. 
  • Enable multi-factor authentication where possible and audit access logs for unusual activity. 
  • Search VPN/firewall logs for connections to 195[.]133[.]79[.]43 and investigate potential lateral movement or persistence. 
Indicators of compromise (IOCs) cited by Socket include the ten package names above, the actor identifier andrew_r1 / parvlhonor@gmx[.]com, the C2 IP 195[.]133[.]79[.]43, and the reported PyInstaller binary hash 80552ce00e5d271da870e96207541a4f82a782e7b7f4690baeca5d411ed71edb.  Socket’s disclosure underscores that Typosquatted packages remain a viable attack vector for delivering credential stealers and other payloads to developers and build systems. Organizations that rely on third-party packages should audit dependencies, apply stricter vetting, and treat any unexpected installation activity as potentially malicious. 

Self-Replicating Worm Hits 180+ Software Packages

16 September 2025 at 10:08

At least 187 code packages made available through the JavaScript repository NPM have been infected with a self-replicating worm that steals credentials from developers and publishes those secrets on GitHub, experts warn. The malware, which briefly infected multiple code packages from the security vendor CrowdStrike, steals and publishes even more credentials every time an infected package is installed.

Image: https://en.wikipedia.org/wiki/Sandworm_(Dune)

The novel malware strain is being dubbed Shai-Hulud — after the name for the giant sandworms in Frank Herbert’s Dune novel series — because it publishes any stolen credentials in a new public GitHub repository that includes the name “Shai-Hulud.”

“When a developer installs a compromised package, the malware will look for a npm token in the environment,” said Charlie Eriksen, a researcher for the Belgian security firm Aikido. “If it finds it, it will modify the 20 most popular packages that the npm token has access to, copying itself into the package, and publishing a new version.”

At the center of this developing maelstrom are code libraries available on NPM (short for “Node Package Manager”), which acts as a central hub for JavaScript development and provides the latest updates to widely-used JavaScript components.

The Shai-Hulud worm emerged just days after unknown attackers launched a broad phishing campaign that spoofed NPM and asked developers to “update” their multi-factor authentication login options. That attack led to malware being inserted into at least two-dozen NPM code packages, but the outbreak was quickly contained and was narrowly focused on siphoning cryptocurrency payments.

Image: aikido.dev

In late August, another compromise of an NPM developer resulted in malware being added to “nx,” an open-source code development toolkit with as many as six million weekly downloads. In the nx compromise, the attackers introduced code that scoured the user’s device for authentication tokens from programmer destinations like GitHub and NPM, as well as SSH and API keys. But instead of sending those stolen credentials to a central server controlled by the attackers, the malicious nx code created a new public repository in the victim’s GitHub account, and published the stolen data there for all the world to see and download.

Last month’s attack on nx did not self-propagate like a worm, but this Shai-Hulud malware does and bundles reconnaissance tools to assist in its spread. Namely, it uses the open-source tool TruffleHog to search for exposed credentials and access tokens on the developer’s machine. It then attempts to create new GitHub actions and publish any stolen secrets.

“Once the first person got compromised, there was no stopping it,” Aikido’s Eriksen told KrebsOnSecurity. He said the first NPM package compromised by this worm appears to have been altered on Sept. 14, around 17:58 UTC.

The security-focused code development platform socket.dev reports the Shai-Halud attack briefly compromised at least 25 NPM code packages managed by CrowdStrike. Socket.dev said the affected packages were quickly removed by the NPM registry.

In a written statement shared with KrebsOnSecurity, CrowdStrike said that after detecting several malicious packages in the public NPM registry, the company swiftly removed them and rotated its keys in public registries.

“These packages are not used in the Falcon sensor, the platform is not impacted and customers remain protected,” the statement reads, referring to the company’s widely-used endpoint threat detection service. “We are working with NPM and conducting a thorough investigation.”

A writeup on the attack from StepSecurity found that for cloud-specific operations, the malware enumerates AWS, Azure and Google Cloud Platform secrets. It also found the entire attack design assumes the victim is working in a Linux or macOS environment, and that it deliberately skips Windows systems.

StepSecurity said Shai-Hulud spreads by using stolen NPM authentication tokens, adding its code to the top 20 packages in the victim’s account.

“This creates a cascading effect where an infected package leads to compromised maintainer credentials, which in turn infects all other packages maintained by that user,” StepSecurity’s Ashish Kurmi wrote.

Eriksen said Shai-Hulud is still propagating, although its spread seems to have waned in recent hours.

“I still see package versions popping up once in a while, but no new packages have been compromised in the last ~6 hours,” Eriksen said. “But that could change now as the east coast starts working. I would think of this attack as a ‘living’ thing almost, like a virus. Because it can lay dormant for a while, and if just one person is suddenly infected by accident, they could restart the spread. Especially if there’s a super-spreader attack.”

For now, it appears that the web address the attackers were using to exfiltrate collected data was disabled due to rate limits, Eriksen said.

Nicholas Weaver is a researcher with the International Computer Science Institute, a nonprofit in Berkeley, Calif. Weaver called the Shai-Hulud worm “a supply chain attack that conducts a supply chain attack.” Weaver said NPM (and all other similar package repositories) need to immediately switch to a publication model that requires explicit human consent for every publication request using a phish-proof 2FA method.

“Anything less means attacks like this are going to continue and become far more common, but switching to a 2FA method would effectively throttle these attacks before they can spread,” Weaver said. “Allowing purely automated processes to update the published packages is now a proven recipe for disaster.”

18 Popular Code Packages Hacked, Rigged to Steal Crypto

8 September 2025 at 18:53

At least 18 popular JavaScript code packages that are collectively downloaded more than two billion times each week were briefly compromised with malicious software today, after a developer involved in maintaining the projects was phished. The attack appears to have been quickly contained and was narrowly focused on stealing cryptocurrency. But experts warn that a similar attack with a slightly more nefarious payload could lead to a disruptive malware outbreak that is far more difficult to detect and restrain.

This phishing email lured a developer into logging in at a fake NPM website and supplying a one-time token for two-factor authentication. The phishers then used that developer’s NPM account to add malicious code to at least 18 popular JavaScript code packages.

Aikido is a security firm in Belgium that monitors new code updates to major open-source code repositories, scanning any code updates for suspicious and malicious code. In a blog post published today, Aikido said its systems found malicious code had been added to at least 18 widely-used code libraries available on NPM (short for) “Node Package Manager,” which acts as a central hub for JavaScript development and the latest updates to widely-used JavaScript components.

JavaScript is a powerful web-based scripting language used by countless websites to build a more interactive experience with users, such as entering data into a form. But there’s no need for each website developer to build a program from scratch for entering data into a form when they can just reuse already existing packages of code at NPM that are specifically designed for that purpose.

Unfortunately, if cybercriminals manage to phish NPM credentials from developers, they can introduce malicious code that allows attackers to fundamentally control what people see in their web browser when they visit a website that uses one of the affected code libraries.

According to Aikido, the attackers injected a piece of code that silently intercepts cryptocurrency activity in the browser, “manipulates wallet interactions, and rewrites payment destinations so that funds and approvals are redirected to attacker-controlled accounts without any obvious signs to the user.”

“This malware is essentially a browser-based interceptor that hijacks both network traffic and application APIs,” Aikido researcher Charlie Eriksen wrote. “What makes it dangerous is that it operates at multiple layers: Altering content shown on websites, tampering with API calls, and manipulating what users’ apps believe they are signing. Even if the interface looks correct, the underlying transaction can be redirected in the background.”

Aikido said it used the social network Bsky to notify the affected developer, Josh Junon, who quickly replied that he was aware of having just been phished. The phishing email that Junon fell for was part of a larger campaign that spoofed NPM and told recipients they were required to update their two-factor authentication (2FA) credentials. The phishing site mimicked NPM’s login page, and intercepted Junon’s credentials and 2FA token. Once logged in, the phishers then changed the email address on file for Junon’s NPM account, temporarily locking him out.

Aikido notified the maintainer on Bluesky, who replied at 15:15 UTC that he was aware of being compromised, and starting to clean up the compromised packages.

Junon also issued a mea culpa on HackerNews, telling the community’s coder-heavy readership, “Hi, yep I got pwned.”

“It looks and feels a bit like a targeted attack,” Junon wrote. “Sorry everyone, very embarrassing.”

Philippe Caturegli, “chief hacking officer” at the security consultancy Seralys, observed that the attackers appear to have registered their spoofed website — npmjs[.]help — just two days before sending the phishing email. The spoofed website used services from dnsexit[.]com, a “dynamic DNS” company that also offers “100% free” domain names that can instantly be pointed at any IP address controlled by the user.

Junon’s mea cupla on Hackernews today listed the affected packages.

Caturegli said it’s remarkable that the attackers in this case were not more ambitious or malicious with their code modifications.

“The crazy part is they compromised billions of websites and apps just to target a couple of cryptocurrency things,” he said. “This was a supply chain attack, and it could easily have been something much worse than crypto harvesting.”

Aikido’s Eriksen agreed, saying countless websites dodged a bullet because this incident was handled in a matter of hours. As an example of how these supply-chain attacks can escalate quickly, Eriksen pointed to another compromise of an NPM developer in late August that added malware to “nx,” an open-source code development toolkit with as many as six million weekly downloads.

In the nx compromise, the attackers introduced code that scoured the user’s device for authentication tokens from programmer destinations like GitHub and NPM, as well as SSH and API keys. But instead of sending those stolen credentials to a central server controlled by the attackers, the malicious code created a new public repository in the victim’s GitHub account, and published the stolen data there for all the world to see and download.

Eriksen said coding platforms like GitHub and NPM should be doing more to ensure that any new code commits for broadly-used packages require a higher level of attestation that confirms the code in question was in fact submitted by the person who owns the account, and not just by that person’s account.

“More popular packages should require attestation that it came through trusted provenance and not just randomly from some location on the Internet,” Eriksen said. “Where does the package get uploaded from, by GitHub in response to a new pull request into the main branch, or somewhere else? In this case, they didn’t compromise the target’s GitHub account. They didn’t touch that. They just uploaded a modified version that didn’t come where it’s expected to come from.”

Eriksen said code repository compromises can be devastating for developers, many of whom end up abandoning their projects entirely after such an incident.

“It’s unfortunate because one thing we’ve seen is people have their projects get compromised and they say, ‘You know what, I don’t have the energy for this and I’m just going to deprecate the whole package,'” Eriksen said.

Kevin Beaumont, a frequently quoted security expert who writes about security incidents at the blog doublepulsar.com, has been following this story closely today in frequent updates to his account on Mastodon. Beaumont said the incident is a reminder that much of the planet still depends on code that is ultimately maintained by an exceedingly small number of people who are mostly overburdened and under-resourced.

“For about the past 15 years every business has been developing apps by pulling in 178 interconnected libraries written by 24 people in a shed in Skegness,” Beaumont wrote on Mastodon. “For about the past 2 years orgs have been buying AI vibe coding tools, where some exec screams ‘make online shop’ into a computer and 389 libraries are added and an app is farted out. The output = if you want to own the world’s companies, just phish one guy in Skegness.”

Image: https://infosec.exchange/@GossiTheDog@cyberplace.social.

Aikido recently launched a product that aims to help development teams ensure that every code library used is checked for malware before it can be used or installed. Nicholas Weaver, a researcher with the International Computer Science Institute, a nonprofit in Berkeley, Calif., said Aikido’s new offering exists because many organizations are still one successful phishing attack away from a supply-chain nightmare.

Weaver said these types of supply-chain compromises will continue as long as people responsible for maintaining widely-used code continue to rely on phishable forms of 2FA.

“NPM should only support phish-proof authentication,” Weaver said, referring to physical security keys that are phish-proof — meaning that even if phishers manage to steal your username and password, they still can’t log in to your account without also possessing that physical key.

“All critical infrastructure needs to use phish-proof 2FA, and given the dependencies in modern software, archives such as NPM are absolutely critical infrastructure,” Weaver said. “That NPM does not require that all contributor accounts use security keys or similar 2FA methods should be considered negligence.”

❌