Shai-Hulud
- Type
- Worm
- Capabilities
- Credential theftExfiltrationPersistenceDefense evasionReconnaissance
- Delivery
- Phishing
- Platforms
- WindowsmacOSLinuxCloud
Shai-Hulud is a self-replicating software supply-chain worm targeting the npm ecosystem, first publicly identified in September 2025. It compromises developer workstations and CI/CD environments through malicious versions of legitimate packages. Using stolen publishing credentials, it modifies additional packages, inserts malicious execution hooks, increments package versions, and republishes infected releases under compromised maintainers’ identities.
The malware harvests npm publishing tokens, GitHub tokens, cloud credentials, API keys, passwords, and other development secrets from environment variables, configuration data, source repositories, and authentication caches. Shai-Hulud 2.0 uses TruffleHog to discover embedded secrets and enumerates secrets held in AWS, Google Cloud, and Azure services. It exfiltrates collected information to attacker-controlled public GitHub repositories. The second wave also retrieves usable tokens exposed by other infected systems when its own credentials lack sufficient permissions, supporting continued propagation.
Shai-Hulud 2.0 establishes persistent command execution by registering compromised machines as self-hosted GitHub Actions runners and installing a malicious workflow. Later variants execute obfuscated JavaScript through the legitimate Bun runtime on Windows, macOS, and Linux. Some use Ethereum smart-contract queries to resolve changeable exfiltration destinations, while deleting temporary runtime artifacts to reduce forensic traces.
Mini Shai-Hulud variants, including Trinitite, extend credential collection and propagation mechanisms, abuse GitHub Actions trusted publishing, and establish persistence through operating-system services and developer-tool hooks. Trinitite includes a token-revocation monitor capable of deleting victim files. Mini Shai-Hulud activity has been associated with TeamPCP, but that association does not establish common attribution for every Shai-Hulud-branded campaign. Its principal targets are software maintainers, development infrastructure, and downstream organizations consuming compromised dependencies.
Associated vulnerabilities
9 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
8 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Shai-Hulud is a self-replicating npm worm first reported by Socket and StepSecurity on 15 September 2025, when about 40 packages were affected, and the count climbed past 180 within a day or so.
In the Shai-Hulud / Miasma family of supply chain worms, the description stamped onto attacker-created GitHub dead-drop repos has functioned as a campaign signature since the original wave hit in September 2025.
In the Shai-Hulud / Miasma family of supply chain worms, the description stamped onto attacker-created GitHub dead-drop repos has functioned as a campaign signature since the original wave hit in September 2025.
The group often uses a purpose-built, self-replicating npm worm it developed called Shai-Hulud to infect GitHub projects.
researchers say are enabling variants of the Shai-Hulud supply-chain worm to infect and compromise hundreds of software packages and developer accounts worldwide.
A new wave of the Shai-Hulud supply chain campaign, adding 23 newly discovered malicious PyPI package-version artifacts to an already alarming operation that previously compromised 37 packages.
+2 more in the app. View in Mallory
Techniques & procedures
160 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
4 techniques
Reconnaissance
An active Shai-Hulud-like supply chain worm campaign spreads via typosquatting and AI toolchain poisoning, across at least 19 malicious npm packages... One representative example, suport-color@1.0.1, impersonates supports-color... Other packages in the set follow the same look-alike branding strategy to increase the likelihood of accidental installation.
“Used GitHub access tokens stolen from TruffleHog to authenticate to GitHub API and enumerate repositories accessible to the victim.”
"capable of using the GitHub search feature to identify a previously created exfiltration repository"
[Shai-Hulud](https://attack.mitre.org/software/S9008) has the ability to search open sites and code repositories for compromised credentials.(Citation: Aikido Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has discovered packages associated with compromised accounts.(Citation: Netskope Shai-Hulud November 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also searched code repositories for other compromised repositories that include predefined parameters or markers to include “Second Coming” combined with an 18-character alphanumeric string.(Citation: Netskope Shai-Hulud November 2025)
Resource Development
7 techniques
Resource Development
a threat actor "uploaded four malicious packages from one [npm] account: a near-verbatim copy of Shai-Hulud with its own command-and-control infrastructure, three Axios typosquats..."
The first step is to compromise either a developer with significant access to an open source project or a misconfigured pipeline, such as via poisoned pipeline execution.
Over the last six months, the threat expanded from npm into PyPI and shifted focus from compromised maintainers to CI/CD abuse.
The supply-chain attack compromised numerous packages in the Mastra-AI npm ecosystem and appeared to begin after an attacker compromised legitimate Mastra credentials.
"However, they did clone the worm..."
ID Technique Implementation T1588.004 Digital Certificates Fulcio certificate abuse for provenance forgery
[Shai-Hulud](https://attack.mitre.org/software/S9008) has published malicious gzip-compressed tarball (.tgz) following modification of packages within compromised accounts.(Citation: Aikido Shai-Hulud September 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also modified packages within compromised accounts.(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)
Initial Access
10 techniques
Initial Access
Attackers used compromised tokens and GitHub credentials to replace CI scripts, trigger publishing workflows, create public repositories, and publish malicious updates through automated systems.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has leveraged compromised accounts to log into cloud services to access cloud hosted repositories.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
The attack includes a worm-like self-propagation mechanism: any maintainer who installed a compromised package had their npm tokens stolen, which the attacker then used to publish poisoned versions of that maintainer’s own packages.
This token allows any machine to register itself as a workflow runner for the attacker-controlled repository, effectively creating a direct, outbound-initiated link from the victim's machine to GitHub's infrastructure.
“An attacker publishes or hijacks a package with malicious code inside it, designed to run when a developer installs it.”
[Shai-Hulud](https://attack.mitre.org/software/S9008) has published itself on compromised code repository maintainers within infected packages in attempts to propagate to other victims.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)(Citation: Socket Shai-Hulud November 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also modified versions of code packages.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025)
публикация вредоносной версии существующего легитимного пакета через захваченный аккаунт
Through compromise of CI runners, TeamPCP effectively converted trusted software distribution channels into malware delivery channels by compromising automated systems that build, test, and publish software.
Inside a GitHub Actions run where GITHUB_WORKFLOW_REF contains release-drafter.yml and GITHUB_REPOSITORY contains /opensearch-js , it requests an Actions OIDC token with audience npm:registry.npmjs.org ... exchanges the OIDC token for a publish token, and publishes.
“The attack typically begins by compromising a maintainer of widely used software, often through phishing...”
Execution
23 techniques
Execution
“It planted a GitHub Actions workflow for persistence.”
These resources are designed to establish persistence mechanisms... ensure that the malicious code can be executed again when the developer later opens a project, launches an editor, enters a Claude Code session, or logs back into the system.
The monitor then polls hxxps[:]//api[.]github[.]com/user every 60 seconds using a stolen GitHub token. If the API returns any 40x response—indicating the token has been revoked—the monitor executes a configured handler, which in this variant decodes to rm -rf ~/ .
It also introduces new payload components, including Bun-runtime-based scripts, which broaden where and how the malware can execute.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has utilized PowerShell `Invoke-WebRequest` to download and install the malicious payload.(Citation: Microsoft Shai-Hulud December 2025)
[Shai-Hulud](https://attack.mitre.org/software/S9008) has utilized Linux shell commands to modify configuration files.(Citation: Socket Shai-Hulud November 2025)
They were injected with a .pth file that Python automatically executed at interpreter startup, even if LiteLLM was never imported, bypassing ignore-scripts protections.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has used JavaScript to create JSON file output and run scripts using node.js.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)(Citation: Socket Shai-Hulud November 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025)
MITRE ATT&CK Mapping Technique ID Implementation Software Deployment Tools T1072 npm publish / PyPI upload abused as lateral movement and propagation
It is the maturing of a trend in which the software build pipeline, and the trust mechanisms meant to protect it, have become the attack surface.
"Once a malicious release is live on the registry, every CI pipeline running npm install or pnpm install is a target."
The security advisory from the maintainer notes that the malicious execution chain triggers automatically on import and silently spawns a background process.
Even if you never install an infected package (“ npm install ” in npm argot), you can still get the nasties – though that is one possible route of infection.
Автоматическое выполнение через postinstall hooks или import-time код (T1204.005 - Malicious Library, Execution)
“Deployed malicious npm packages and write unauthorised GitHub Actions workflow files (‘shai-hulud.yaml’ or ‘shai-hulud-workflow.yml’) into compromised repositories.”
At the core of this attack is a ~3.6MB minified bundle.js file, which executes asynchronously during npm install. This execution is likely triggered via a hijacked postinstall script embedded in the compromised package.json.
Attackers modified package manifests with a malicious preinstall script that downloaded the legitimate Bun runtime to silently launch a 727 KB obfuscated payload in the background.
The affected releases contain a malicious preinstall hook that invokes setup.mjs.
Shai-Hulud 2.0 is delivered as an NPM package with a malicious preinstall script that executes automatically during the NPM installation process
The commit was referenced via a malicious optional dependency, causing npm to automatically fetch and execute attacker-controlled code during package installation.
Registers the infected machine as a self-hosted runner named "SHA1HULUD" and adds a workflow called .github/workflows/discussion.yaml... allowing the attacker to run arbitrary commands on the infected machines by opening discussions in the GitHub repository.
The second stage is a credential stealer and worm ... that propagates inside cloud environments via AWS SSM (inside EC2) and kubectl exec (inside Kubernetes).
[Shai-Hulud](https://attack.mitre.org/software/S9008) has also leveraged GitHub actions from stolen accounts in order to create a malicious Github workflow within `.github/workflows/discussion.yaml`.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Socket Shai-Hulud November 2025)
Persistence
28 techniques
Persistence
Another new aspect of the campaign is the focus on abuse via .pth startup files, which is a distinct execution mechanism compared to the npm lifecycle script abuse seen previously.
“It planted a GitHub Actions workflow for persistence.”
These resources are designed to establish persistence mechanisms... ensure that the malicious code can be executed again when the developer later opens a project, launches an editor, enters a Claude Code session, or logs back into the system.
The monitor then polls hxxps[:]//api[.]github[.]com/user every 60 seconds using a stolen GitHub token. If the API returns any 40x response—indicating the token has been revoked—the monitor executes a configured handler, which in this variant decodes to rm -rf ~/ .
Attackers used compromised tokens and GitHub credentials to replace CI scripts, trigger publishing workflows, create public repositories, and publish malicious updates through automated systems.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has leveraged compromised accounts to log into cloud services to access cloud hosted repositories.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
[Shai-Hulud](https://attack.mitre.org/software/S9008) has modified GitHub account settings for private repositories and changed them to public.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
For example, the code searches aggressively for cloud authentication tokens and private SSH keys.
Modifies /etc/hosts for DNS redirection
This token allows any machine to register itself as a workflow runner for the attacker-controlled repository, effectively creating a direct, outbound-initiated link from the victim's machine to GitHub's infrastructure.
GitHub dead-drop exfiltration by creating repositories under a usable GitHub token and committing encrypted result files under results/ .
Behavioral indicators include ... the mass creation of GitHub repositories with Dune-themed naming and reversed "Shai-Hulud" strings in descriptions.
La liste des TTPs détectés dans l’article identifie « T1176 — Browser Extensions (Persistence) ».
reuses those credentials to (1) publish poisoned package versions, (2) inject an obfuscated dropper into source repositories
After collecting npm tokens or trusted-publishing credentials, the payload identifies packages the victim can publish, downloads the current package tarballs, rewrites their metadata, bumps the patch version, and publishes the modified archives.
Install GitHub Actions runner for persistence if ( await this.checkWorkflowScope())
The Shai-Hulud worm utilizes an advanced technique by injecting malicious GitHub Actions workflows into targeted repositories, enabling automated propagation and secret exfiltration
A watcher, installed as a Linux systemd user service or a macOS LaunchAgent, polls api.github.com/user with a stolen token roughly every 60 seconds.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has stopped `systemd-resolved` in order to manipulate DNS and firewalls.(Citation: Socket Shai-Hulud November 2025)
The payload uses an install-time action to begin execution... File index.js Root-level payload file Execution command bun run index.js Command executed by the preinstall script. | Persistence file .claude/settings.json Claude configuration file created by the malware. | The source material describes attempts to create project configuration files that may leave an execution path when a repository is opened later... Persistence file .vscode/tasks.json Visual Studio Code task configuration created by the malware.
As expected, 99% of all infection instances came from the preinstall event executing node setup_bun.js.
the seed packages plant autostart hooks in .claude/settings.json and .vscode/tasks.json . The two are cross-wired
[Shai-Hulud](https://attack.mitre.org/software/S9008) has inserted a new lifecycle hook to include `postinstall`.(Citation: Aikido Shai-Hulud September 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also leveraged the NPM lifecycle hook `preinstall`.(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Microsoft Shai-Hulud December 2025)(Citation: Socket Shai-Hulud November 2025)
Mini Shai-Hulud adds or extends several techniques, including: ... Establishing host-level persistence.
On macOS, unload gh-token-monitor with launchctl bootout ... ~/Library/LaunchAgents/com.user.gh-token-monitor.plist ... On macOS, unload kitty-monitor ... ~/Library/LaunchAgents/com.user.kitty-monitor.plist
Cycle : téléchargement de tarball → injection de payload → bump de version → republication.
automatically steals and publicly publishes secrets to GitHub... and makes private repositories public.
when a compromised package encounters additional npm tokens in its environment, it will automatically publish malicious versions of any packages it can access - spreading across the npm ecosystem.
Privilege Escalation
23 techniques
Privilege Escalation
Another new aspect of the campaign is the focus on abuse via .pth startup files, which is a distinct execution mechanism compared to the npm lifecycle script abuse seen previously.
“It planted a GitHub Actions workflow for persistence.”
These resources are designed to establish persistence mechanisms... ensure that the malicious code can be executed again when the developer later opens a project, launches an editor, enters a Claude Code session, or logs back into the system.
The monitor then polls hxxps[:]//api[.]github[.]com/user every 60 seconds using a stolen GitHub token. If the API returns any 40x response—indicating the token has been revoked—the monitor executes a configured handler, which in this variant decodes to rm -rf ~/ .
Отдельный модуль на Python читает /proc/<PID>/mem процесса Runner.Worker GitHub Actions, вытаскивая JSON-объекты с {"value":"...","isSecret":true}
It also reads GitHub Actions runner memory, installs a token-revocation watcher and carries npm publishing machinery.
The attack chain for CVE-2025-10894 began with exploitation of a GitHub Actions workflow in the Nx repository. The workflow used the pull_request_target trigger, which grants elevated permissions (including a writable GITHUB_TOKEN) to workflows running on pull requests from forks.
Attackers used compromised tokens and GitHub credentials to replace CI scripts, trigger publishing workflows, create public repositories, and publish malicious updates through automated systems.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has leveraged compromised accounts to log into cloud services to access cloud hosted repositories.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
[Shai-Hulud](https://attack.mitre.org/software/S9008) has modified GitHub account settings for private repositories and changed them to public.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
For example, the code searches aggressively for cloud authentication tokens and private SSH keys.
The Shai-Hulud worm utilizes an advanced technique by injecting malicious GitHub Actions workflows into targeted repositories, enabling automated propagation and secret exfiltration
A watcher, installed as a Linux systemd user service or a macOS LaunchAgent, polls api.github.com/user with a stolen token roughly every 60 seconds.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has stopped `systemd-resolved` in order to manipulate DNS and firewalls.(Citation: Socket Shai-Hulud November 2025)
The payload uses an install-time action to begin execution... File index.js Root-level payload file Execution command bun run index.js Command executed by the preinstall script. | Persistence file .claude/settings.json Claude configuration file created by the malware. | The source material describes attempts to create project configuration files that may leave an execution path when a repository is opened later... Persistence file .vscode/tasks.json Visual Studio Code task configuration created by the malware.
As expected, 99% of all infection instances came from the preinstall event executing node setup_bun.js.
the seed packages plant autostart hooks in .claude/settings.json and .vscode/tasks.json . The two are cross-wired
[Shai-Hulud](https://attack.mitre.org/software/S9008) has inserted a new lifecycle hook to include `postinstall`.(Citation: Aikido Shai-Hulud September 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also leveraged the NPM lifecycle hook `preinstall`.(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Microsoft Shai-Hulud December 2025)(Citation: Socket Shai-Hulud November 2025)
Mini Shai-Hulud adds or extends several techniques, including: ... Establishing host-level persistence.
On macOS, unload gh-token-monitor with launchctl bootout ... ~/Library/LaunchAgents/com.user.gh-token-monitor.plist ... On macOS, unload kitty-monitor ... ~/Library/LaunchAgents/com.user.kitty-monitor.plist
MITRE ATT&CK Mapping Technique ID Implementation Abuse Elevation Control Mechanism T1548 sudo python3 runner secret dump (F-02)
[Shai-Hulud](https://attack.mitre.org/software/S9008) has attempted to gain root access by leveraging `sudo` and `/etc/sudoers.d`.(Citation: Socket Shai-Hulud November 2025)
The popularity of Linux is closely correlated to the fact that the majority of the runners are actually containers, supporting the value of attacker attempts to incorporate the container escape.
Stealth
29 techniques
Stealth
[Shai-Hulud](https://attack.mitre.org/software/S9008) has utilized double-base64 encoding to store stolen secrets within the Github Action Logs within the victim account.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also leveraged three layers of base64 encoding of exfiltrated data for anti-forensic purposes.(Citation: Socket Shai-Hulud November 2025)
Shai-Hulud used dead code and bundling, which inflated a few KB of logic to appear as 10 MB of obfuscated code.
Other exfiltration traffic blended into legitimate services by disguising HTTPS communications as OpenTelemetry traffic.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has masqueraded as a legitimate Bun installer.(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Socket Shai-Hulud November 2025)
[Shai-Hulud](https://attack.mitre.org/software/S9008) has augmented its installation process by having its original install process exit cleanly to provide the user with the illusion that the service is installed normally.(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Socket Shai-Hulud November 2025)
Отдельный модуль на Python читает /proc/<PID>/mem процесса Runner.Worker GitHub Actions, вытаскивая JSON-объекты с {"value":"...","isSecret":true}
It also reads GitHub Actions runner memory, installs a token-revocation watcher and carries npm publishing machinery.
it can detonate a destructive routine that runs find ~ -type f -writable -user $USER -print0 | xargs -0 shred -uvz -n 1
“It also added a more destructive fallback that could attempt to wipe a user's home directory.”
Deep Specter said the worm uses this feature to make recently added malicious changes appear like routine edits from years earlier, evading defenses that look in a repository's history for recent suspicious activity.
Attackers used compromised tokens and GitHub credentials to replace CI scripts, trigger publishing workflows, create public repositories, and publish malicious updates through automated systems.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has leveraged compromised accounts to log into cloud services to access cloud hosted repositories.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)
It is the maturing of a trend in which the software build pipeline, and the trust mechanisms meant to protect it, have become the attack surface.
Defense Evasion (T1027, T1140). Payload обфусцирован в несколько слоёв...
Region guardrails retained: Russian locale terminates; Israeli/Iranian locale triggers a randomized destructive payload.
CI Detection LO() fingerprints 25 CI/CD platforms by environment variable.
The malware checks for CI/CD environment variables to determine if it's running in a continuous integration pipeline or on a developer's local machine.
Identifying poisoned packages is challenging, because the worm can back-date changes to years in the past, which makes them look legitimate
Naming the malicious file _hooks.py (underscore prefix suggesting "private/internal") and _runtime.bin (.bin extension disguising JavaScript as binary data) were deliberate social engineering choices designed to avoid scrutiny during code review.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has suppressed NPM warnings by silently exiting through the use of the NPM success code that has a setting that all errors exit with `code 0`.(Citation: Socket Shai-Hulud November 2025)
“Deployed malicious npm packages and write unauthorised GitHub Actions workflow files (‘shai-hulud.yaml’ or ‘shai-hulud-workflow.yml’) into compromised repositories.”
At the core of this attack is a ~3.6MB minified bundle.js file, which executes asynchronously during npm install. This execution is likely triggered via a hijacked postinstall script embedded in the compromised package.json.
Attackers modified package manifests with a malicious preinstall script that downloaded the legitimate Bun runtime to silently launch a 727 KB obfuscated payload in the background.
The affected releases contain a malicious preinstall hook that invokes setup.mjs.
Shai-Hulud 2.0 is delivered as an NPM package with a malicious preinstall script that executes automatically during the NPM installation process
The commit was referenced via a malicious optional dependency, causing npm to automatically fetch and execute attacker-controlled code during package installation.
The comment contains fake instructions to an LLM... designed to trigger LLM safety refusals and disrupt AI-assisted malware triage before the scanner reaches the obfuscated Hades payload
[Shai-Hulud](https://attack.mitre.org/software/S9008) has delayed execution of its larger payloads by forking itself into background process.(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)
MITRE ATT&CK Mapping Technique ID Implementation Impersonation T1656 Dependabot + CodeQL + GitHub Security bot commit identity spoofing
Defense Impairment
9 techniques
Defense Impairment
Modifies /etc/hosts for DNS redirection
[Shai-Hulud](https://attack.mitre.org/software/S9008) has suppressed victim NPM warnings using `process[“exit’](0x0);` which results in having all errors exit with code 0.(Citation: Socket Shai-Hulud November 2025)
automatically steals and publicly publishes secrets to GitHub... and makes private repositories public.
when a compromised package encounters additional npm tokens in its environment, it will automatically publish malicious versions of any packages it can access - spreading across the npm ecosystem.
It pushes sv, a malicious workflow disguised as “CodeQL Analysis”, to the compromised repository
"deployed a modified lint workflow to harvest all GitHub secrets, including the npm publishing token"
[Shai-Hulud](https://attack.mitre.org/software/S9008) has replaced DNS configuration from `/tmp/resolved.conf` in order to gain control of network-level control within CI environments and has flushed iptables rules using `sudo iptables -F OUTPUT` and `sudo iptables -F DOCKER-USER`.(Citation: Socket Shai-Hulud November 2025)
LockBit 2.0 'can disable firewall rules'; Shai-Hulud 'has flushed iptables rules using sudo iptables -F OUTPUT and sudo iptables -F DOCKER-USER.'
Shai-Hulud 'has flushed iptables rules using sudo iptables -F OUTPUT and sudo iptables -F DOCKER-USER' within CI environments.
Credential Access
15 techniques
Credential Access
On Linux GitHub Actions runners, it uses sudo python3 to read the Runner.Worker process memory through /proc/<pid>/mem and extracts secret-store objects marked isSecret:true .
[Shai-Hulud](https://attack.mitre.org/software/S9008) has stolen access tokens and API tokens from with CI/CD pipeline solutions and repositories.(Citation: Netskope Shai-Hulud November 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025)
Behavioral indicators include outbound validation calls against npm registry using stolen tokens.
“The worm stole repository secrets” and a later Shai-Hulud variant was described as “scanning 469 locations for credentials.”
Filesystem secret scanning: It downloads and runs Trufflehog , a legitimate secrets-discovery tool, and leverages it to scan the user’s home directory recursively.
It retains the familiar behavior: Broad credential collection from files, environment variables, shell history, GitHub CLI tokens, cloud credentials, package-manager tokens, and CI/CD environments.
Post-install hooks scanned systems for "credentials, tokens, or SSH keys," while AI-agent prompts were intended to locate GitHub/NPM tokens, cloud credentials, and SSH keys.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has queried the AWS and GCP metadata endpoints for instances and service credentials.(Citation: Aikido Shai-Hulud September 2025)
It resolves AWS credentials from environment, profiles, web-identity tokens, ECS metadata, and IMDSv2, then enumerates Secrets Manager and SSM Parameter Store (with WithDecryption: true ) across 17 regions.
The malware allows TeamPCP's hackers to steal credentials that let them publish malicious versions of those software development tools... The attack on LiteLLM harvested cloud service keys and other secrets from more than 2,500 organizations.
The filesystem collector reads hundreds of configured paths across Linux, macOS, and Windows: ... browser credential stores ...
The malicious payload attempts to enumerate: AWS Secrets Manager secrets GCP Secret Manager entries Azure Key Vault secrets
automatically steals and publicly publishes secrets to GitHub... and makes private repositories public.
when a compromised package encounters additional npm tokens in its environment, it will automatically publish malicious versions of any packages it can access - spreading across the npm ecosystem.
Once installed, the malicious packages will attempt to collect and exfiltrate credentials and tokens for NPM GitHub, Azure, GCP, and AWS accounts
Discovery
10 techniques
Discovery
The cQ0() function performs process detection by checking if the malware agent is already running on the system by searching for "/home/agent/agent" in the process list.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has gathered victim system information.(Citation: Aikido Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025)
[bundle.js] searches the infected machine for anything resembling credentials. | Shai-Hulud 2.0 ... salt[s] the wound on its way out by deleting the user’s home directory if it couldn’t find credentials to steal or a way to spread.
When it finds usable npm publishing access, it identifies other packages controlled by the victim
CI Detection LO() fingerprints 25 CI/CD platforms by environment variable.
The malware checks for CI/CD environment variables to determine if it's running in a continuous integration pipeline or on a developer's local machine.
The Core Malicious Payload detects multiple EDR and security products by checking process names and installation paths
If it finds an npm token, it calls the registry’s API to list every package the compromised developer maintains.
it exploits Docker's privileged container access to mount the host filesystem and modify the sudoers configuration file
The comment contains fake instructions to an LLM... designed to trigger LLM safety refusals and disrupt AI-assisted malware triage before the scanner reaches the obfuscated Hades payload
Lateral Movement
8 techniques
Lateral Movement
The malware added a GitHub workflow file that could execute commands by opening a GitHub discussion
The AWS collector resolves credentials from environment variables, IMDS, and shared credential files, then enumerates Secrets Manager and SSM Parameter Store values across multiple regions. The GCP collector uses service-account or authorized-user credentials to read Secret Manager entries, while the Azure collector lists subscriptions, Key Vaults, and secrets.
MITRE ATT&CK Mapping Technique ID Implementation Software Deployment Tools T1072 npm publish / PyPI upload abused as lateral movement and propagation
The Register has been covering the story of the Shai-Hulud JavaScript worm for months. We introduced this self-propagating worm in September.
The attack includes a worm-like self-propagation mechanism: any maintainer who installed a compromised package had their npm tokens stolen, which the attacker then used to publish poisoned versions of that maintainer’s own packages.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has leveraged captured valid NPM tokens to enumerate and update packages on compromised accounts.(Citation: Aikido Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also utilized stolen GitHub access tokens to access compromised accounts.(Citation: Socket Shai-Hulud November 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025)
SSH lateral movement using ai_setup.sh and ai_init.js .
It cloned private repositories to attacker accounts, created a new branch in each, and deployed a malicious workflow to automate data theft.
Collection
8 techniques
Collection
The AFP estimates the campaign hit more than 1,000 organizations worldwide, with over 500,000 credentials stolen and at least 300 gigabytes of data taken.
The loader writes the main payload to a transient file under /tmp/p*.js, runs it with Bun, and deletes the file afterward.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has the ability to automatically collect host data, secrets, system information, and endpoints.(Citation: Aikido Shai-Hulud September 2025)(Citation: Netskope Shai-Hulud November 2025)(Citation: Microsoft Shai-Hulud December 2025)
“The worm stole repository secrets and source code for the company's products.”
[Shai-Hulud](https://attack.mitre.org/software/S9008) has downloaded existing packages from code repositories and extracted data stored within them.(Citation: Aikido Shai-Hulud September 2025)
The malware also searched for cloud provider credentials associated with Amazon Web Services, Microsoft Azure, and Google Cloud Platform.
Once stolen, they’re encrypted and sent to a public GitHub repository with the description "Shai-Hulud: Here We Go Again."
ID Technique Implementation T1560.001 Archive via Utility gzip compression before encryption
Command and Control
14 techniques
Command and Control
In case the primary C2 becomes unreachable, a fallback mechanism called FIRESCALE is activated. When the primary C2 is unavailable, the malware searches all public GitHub commit messages worldwide for a signed alternative server URL... Exfiltration follows three paths in sequence: primary C2 server, FIRESCALE dead-drop redirect, and the victim's own GitHub repository.
One of the most striking aspects of the campaign was its extensive use of legitimate platforms for C2 and exfiltration. Rather than relying exclusively on traditional malware infrastructure, the attackers used GitHub repositories as dead-drop locations for stolen data.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has utilized curl to install Bun over HTTPS.(Citation: Microsoft Shai-Hulud December 2025)
It then exfiltrates all collected data... through three channels in cascade... and DNS tunneling via base32-encoded queries to freefan[.]net (primary) and fanfree[.]net (secondary), with a DGA fallback seeded by "sw2025"...
“The stolen information is sent encrypted to a new repository in GitHub” and the comparison table identifies a “GitHub C2” repository description and commit message.
Rather than relying exclusively on traditional malware infrastructure, the attackers used GitHub repositories as dead-drop locations for stolen data. In some cases, more than 2,500 public repositories were reportedly created using compromised GitHub tokens for this purpose.
MITRE ATT&CK Mapping TechniqueIDDescription Web Service C2T1102.002GitHub commits API as bidirectional C2 channel
C2 и Exfiltration (T1104, T1041). Украденные данные шифруются и уходят через несколько каналов: Session Protocol CDN, GitHub GraphQL API... прямые POST-запросы на C2-домены.
[Shai-Hulud](https://attack.mitre.org/software/S9008) has downloaded packages from code repositories.(Citation: Aikido Shai-Hulud September 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Socket Shai-Hulud November 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also downloaded and executed the secrets-discovery tool [TruffleHog](https://attack.mitre.org/software/S9009) to gather sensitive data.(Citation: Netskope Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)(Citation: Microsoft Shai-Hulud December 2025)(Citation: Socket Shai-Hulud November 2025)(Citation: Socket Shai-Hulud Trufflehog September 2025)
The exfiltrated data is encoded through three layers of Base64-encoding before upload.
Rather than hardcoding infrastructure, the malware resolves its C2 domains from an Ethereum mainnet smart contract
the malware resolves its C2 domains from an Ethereum mainnet smart contract of type StringListStore
“The stolen information is sent encrypted to a new repository in GitHub,” while the malware includes new public encryption keys and uses AES-GCM.
ID Technique Implementation T1573.002 Asymmetric Cryptography RSA-4096 + AES-256-GCM hybrid encryption
Exfiltration
7 techniques
Exfiltration
"access private repositories, pull data"; "data exfil" is referenced generally in the article context of downstream harm
[Shai-Hulud](https://attack.mitre.org/software/S9008) has used POST to exfiltrate secrets from the victim environment to an attacker-controlled URL.(Citation: Aikido Shai-Hulud September 2025)(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Wiz Shai-Hulud September 2025)
identifying StepSecurity domains and sandboxes and falling back to DNS-based exfiltration when conventional channels are blocked.
“It exfiltrated what it found to a hardcoded webhook and to a public GitHub repository it created on the victim's own account.”
Beyond CLI-level control, the malware also uses stolen GitHub tokens to create public repositories that serve as exfiltration buckets.
«червь Sha1-Hulud предположительно экспортировал украденные credentials в виде JSON-блобов в свежесозданные публичные репозитории».
[Shai-Hulud](https://attack.mitre.org/software/S9008) has exfiltrated repository secrets to `webhook[.]site`.(Citation: Wiz Shai-Hulud September 2025)
Impact
9 techniques
Impact
[Shai-Hulud](https://attack.mitre.org/software/S9008) has destroyed the victim’s home directory by overwriting and deleting every writable file within the user's home folder.(Citation: Palo Alto Unit 42 Shai-Hulud November 2025)(Citation: Socket Shai-Hulud November 2025) [Shai-Hulud](https://attack.mitre.org/software/S9008) has also utilized the `shred` command on Linux devices.(Citation: Microsoft Shai-Hulud December 2025)
MITRE ATT&CK Mapping Technique ID Implementation Data Encrypted for Impact T1486 rm -rf ~/ wiper gated on org membership (F-10)
dead man's switch... initiates data destruction... using cipher and shred... can make forensic recovery virtually impossible.
tags the commit with “Shai-Hulud: Here We Go Again”
One package reportedly goes beyond credential theft and attempts to pull infected systems into a DDoS botnet
The malware has a dead man’s switch trigger, to delete the current machine if the stolen GitHub token is revoked
If these repositories are private, a new public repository — including its contents — is created using the user’s credentials and original data. The new public repository name is identical to the original, with an added -migration suffix.
Shai-Hulud autonomously propagates by modifying the package.json files of all npm packages maintained by the victim, injecting its malicious script and republishing the packages to the npm registry.
The two men were principal members of a 'sophisticated cybercrime syndicate' that created malicious open source software designed to steal data and extort ransoms from businesses.
Observables
287 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
200 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.