Miasma
- Type
- Worm
- Capabilities
- Credential theftExfiltrationPersistenceLateral movementDefense evasionReconnaissance
- Delivery
- Lure
- Platforms
- LinuxmacOSWindows
Miasma is a modular software-supply-chain worm family targeting developer workstations and CI/CD environments on Linux, macOS, and Windows. It combines credential theft, package and repository propagation, persistent remote access, and configuration poisoning of development tools. The family derives from the publicly released Shai-Hulud toolkit. Miasma has been associated with TeamPCP, but shared source code does not establish common operators for all derivatives, including later testmetest-linked builds.
Distribution includes malicious or compromised packages in npm, PyPI, and RubyGems, as well as poisoned repositories. Depending on the build, execution occurs during package installation, module loading, or the opening of a repository in a configured editor or AI coding assistant. Compromised publishing workflows can produce malicious releases carrying valid provenance attestations. Repository-based persistence abuses legitimate features in Claude Code, Gemini CLI, Cursor, and Visual Studio Code, including session hooks, MCP server configurations, and folder-open tasks.
Credential-stealing variants collect cloud credentials, package-registry tokens, Git credentials, SSH keys, browser passwords, container and Kubernetes secrets, password-manager data, cryptocurrency-wallet material, and AI-service credentials. Some builds extract secrets from GitHub Actions runner memory and use available cloud credentials to retrieve additional secrets. Stolen data can be encrypted and exfiltrated through attacker infrastructure or public GitHub and GitLab repositories. Propagation routines reuse stolen credentials to publish infected package versions, modify repositories and CI workflows, and copy the malware to SSH-accessible hosts. Obfuscation, encrypted payloads, native loaders, environment checks, and security-agent tampering provide defense evasion.
Persistence mechanisms include systemd user services, macOS LaunchAgents or shell-profile modifications, Windows logon autoruns, and poisoned development-tool configurations. Remote-access functionality includes shell execution, file operations, payload replacement, and encrypted command channels, with some builds supporting decentralized discovery or fallback mechanisms. The AsyncAPI deployment operated primarily as a persistent remote-access implant, with automatic credential harvesting and propagation disabled. Certain later derivatives also contain a conditional destructive monitor that deletes user data when a stolen GitHub token becomes invalid; this behavior is not universal across the family.
Associated vulnerabilities
5 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
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The Mini Shai-Hulud and Miasma worm waves, largely attributed to TeamPCP ... reused stolen tokens to spread further.
The GitHub fingerprint the attackers left behind – a repository description reading “Alright Lets See If This Works” turned up on over 320 infected repositories before researchers began pulling the thread. That string is not something random. 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 GitHub fingerprint the attackers left behind – a repository description reading “Alright Lets See If This Works” turned up on over 320 infected repositories before researchers began pulling the thread. That string is not something random. 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.
An infrastructure provider's networks have been breached and they were dealing with the Miasma worm. That worm, as it turns out, is pretty hard to catch and delete because it is self-spreading through IDE configuration settings and through AI assisted environments.
An infrastructure provider's networks have been breached and they were dealing with the Miasma worm. That worm, as it turns out, is pretty hard to catch and delete because it is self-spreading through IDE configuration settings and through AI assisted environments.
Techniques & procedures
111 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
2 techniques
Reconnaissance
The TypoMutator... downloads the original wheel for each target package, injects the .pth payload... and publishes under a typosquatted name... the code only appends -mcp and -mpc.
If classic (non-fine-grained) GitHub tokens are found, a GrepProvider gets registered that presumably searches repository contents for additional credentials.
Resource Development
5 techniques
Resource Development
The information is then uploaded to a public GitHub repository with description "Alright Lets See If This Works."
The timing acquired an extra layer of awkwardness on Friday, when 73 Microsoft-owned GitHub repositories — including the Actions used to deploy Azure Functions — were disabled in a Miasma worm attack, breaking CI/CD pipelines for developers globally.
From Red Hat’s npm namespace, Miasma moved to attacking source repositories directly, skipping the package registry entirely for some targets and planting payload runners straight into public repos.
The supply-chain attack compromised numerous packages in the Mastra-AI npm ecosystem and appeared to begin after an attacker compromised legitimate Mastra credentials.
Some of the other packages include a set of AI and Model Context Protocol (MCP)-themed packages and typosquat-style packages such as rsquests, tlask, and rlask that impersonate requests and flask, and a langchain-core-mcp.
Initial Access
10 techniques
Initial Access
Les identifiants ciblés comprennent clés IAM, jetons OIDC, jetons Entra ID, comptes de service GCP, PATs et clés API; la liste inclut T1078 — Valid Accounts.
It requests id-token: write, which grants access to a GitHub OIDC token that can be exchanged for npm publish credentials via npm’s trusted publishing.
используя похищенные токены, Miasma стремится опубликовать зараженные версии всех пакетов, к которым имеет доступ жертва... превращает заражение в самораспространяющуюся атаку на цепочку поставок
The dropper executes automatically when an infected repository is cloned and opened within these popular developer tools
Attackers target a commonly used software dependency and hijack its latest version to inject malicious code to be executed in victim environments.
Attackers then pushed poisoned commits and let the project’s own trusted publishing path release the malware under a valid npm identity.
Given a stolen RubyGems API key, it lists the gems the key can publish, downloads each one, unpacks data.tar.gz, and adds two files.
Bypasses GitHub environment protection rules to trigger deployments... Hijacks GitHub Actions semver tags via orphan commits with cloned author metadata.
AsyncAPI’s own publishing workflows then released the modified packages through the official npm namespace. Because the packages came from legitimate project automation, they could appear more trustworthy...
StepSecurity said the credential-stealing malware in the Microsoft repos was focused on AI coding agents.
Execution
16 techniques
Execution
The workflow is a weaponized GitHub Actions pipeline... The workflow triggers on every push to any branch.
Miasma features a persistence mechanism of its own, setting up a systemd, crontab, macOS launchd, and Windows Registry autostart keys.
For each one it finds, it injects a hook command which helps the malware stay persistent... every time the developer starts an AI coding session, the malware runs silently and automatically.
Command 11 (ShellExec) passes the request to child_process.exec()... testMode is false in this seed, so the real shell runs
downloads the Bun JavaScript runtime and runs the bundled ext/strutil-core/index.js during gem install
Instead of using a visible install script in package.json, the attackers added a file called binding.gyp to each malicious package. When npm sees this file, it automatically runs node-gyp, a native build tool. The attackers exploit this behavior to trigger code execution without raising the red flags that a traditional install script would.
TeamPCP modified tools including, but not limited to, Trivy, KICS, LiteLLM, and the Telnyx Python SDK. These tools are commonly integrated into enterprise development continuous integration (CI)/continuous delivery (CD) pipelines, cloud infrastructure, and security workflows.
The malicious code is not in an npm lifecycle hook. It was placed in modules that run during normal use... The payload runs when the module loads, so a plain require() is enough to trigger it.
the first-stage implant in the published packages is an obfuscated JavaScript statement that ultimately triggers a downloader when the infected file is imported.
In this case, the payload executes on import/require, not install.
The malware does not rely on the usual install scripts... Instead it springs to life when any application or build tool loads the poisoned module.
в новой волне атак изменился способ запуска малвари: вредоносные релизы больше не используют lifecycle-хуки в package.json. Вместо этого код выполняется во время установки через файл binding.gyp.
The compromised releases shipped a *-setup.pth file that attempts to execute automatically during Python startup, download the Bun JavaScript runtime, and run an obfuscated JavaScript payload named _index.js.
The langchain-core-mcp variant goes further by installing a .pth loader that searches sys.path for _index.js, meaning the loader and payload do not need to live in the same wheel.
The packages contained newly added installation-time execution mechanisms, including preinstall scripts that automatically invoked a malicious index.js file during package installation.
AWS SSM Mutator propagates to EC2 instances managed by AWS Systems Manager... Delivers via ssm:SendCommand using AWS-RunShellScript
Persistence
17 techniques
Persistence
It added commands to shell startup files on macOS...
The workflow is a weaponized GitHub Actions pipeline... The workflow triggers on every push to any branch.
Miasma features a persistence mechanism of its own, setting up a systemd, crontab, macOS launchd, and Windows Registry autostart keys.
Les identifiants ciblés comprennent clés IAM, jetons OIDC, jetons Entra ID, comptes de service GCP, PATs et clés API; la liste inclut T1078 — Valid Accounts.
It requests id-token: write, which grants access to a GitHub OIDC token that can be exchanged for npm publish credentials via npm’s trusted publishing.
For example, the code searches aggressively for cloud authentication tokens and private SSH keys.
GitHub tokens can then be used to create repositories, upload encrypted data, modify workflows, poison source repositories, or prepare additional propagation paths. GitHub repository activity from services-admin-pearhealthlabs shows hundreds of public repositories with randomized names...
reuses those credentials to (1) publish poisoned package versions, (2) inject an obfuscated dropper into source repositories
Для кражи секретов из CI/CD малварь создает workflow с названием Run Copilot и извлекает данные из памяти раннера GitHub Actions.
Если владелец отзывает токен, запускается команда удаления файлов из домашнего каталога и директории Documents (в Linux за это отвечает сервис systemd, в macOS — LaunchAgent).
The third stage... establishes persistence via systemd user services on Linux... The payload uses miasma-monitor.service within the persistence code.
Both tools support a settings.json file that can specify commands to run automatically at the start of every session, under a key called SessionStart.
Persistence is installed through platform-specific mechanisms: ... macOS shell RC injection (.zshrc, .bashrc, or .bash_profile).
The malicious payload is delivered through a single added line in each compromised package’s package.json: The preinstall hook is one of npm’s oldest lifecycle hooks. It runs before the package’s dependencies are resolved.
Persistence and command channels were already active, so a later remote update could flip those switches without another package release.
Persistence is installed through platform-specific mechanisms: a Windows HKCU Run key (miasma-monitor)...
Это наделяет вредоноса возможностями червя, позволяет обойти двухфакторную аутентификацию npm
Privilege Escalation
19 techniques
Privilege Escalation
It added commands to shell startup files on macOS...
The workflow is a weaponized GitHub Actions pipeline... The workflow triggers on every push to any branch.
Miasma features a persistence mechanism of its own, setting up a systemd, crontab, macOS launchd, and Windows Registry autostart keys.
It also scrapes GitHub Actions runner memory before committing the stolen data to a GitHub repository created through the victim's account
It also scrapes GitHub Actions runner memory directly reading from /proc/*/mem on Linux runners to extract OIDC tokens and masked secrets in their unmasked form.
The attack began with a vulnerable GitHub Actions configuration that allowed untrusted pull request content to interact with a privileged workflow context. This gave the attacker a path to obtain or abuse an AsyncAPI automation identity and make unauthorized repository changes.
Les identifiants ciblés comprennent clés IAM, jetons OIDC, jetons Entra ID, comptes de service GCP, PATs et clés API; la liste inclut T1078 — Valid Accounts.
It requests id-token: write, which grants access to a GitHub OIDC token that can be exchanged for npm publish credentials via npm’s trusted publishing.
For example, the code searches aggressively for cloud authentication tokens and private SSH keys.
Для кражи секретов из CI/CD малварь создает workflow с названием Run Copilot и извлекает данные из памяти раннера GitHub Actions.
Если владелец отзывает токен, запускается команда удаления файлов из домашнего каталога и директории Documents (в Linux за это отвечает сервис systemd, в macOS — LaunchAgent).
The third stage... establishes persistence via systemd user services on Linux... The payload uses miasma-monitor.service within the persistence code.
Both tools support a settings.json file that can specify commands to run automatically at the start of every session, under a key called SessionStart.
Persistence is installed through platform-specific mechanisms: ... macOS shell RC injection (.zshrc, .bashrc, or .bash_profile).
The malicious payload is delivered through a single added line in each compromised package’s package.json: The preinstall hook is one of npm’s oldest lifecycle hooks. It runs before the package’s dependencies are resolved.
Persistence and command channels were already active, so a later remote update could flip those switches without another package release.
Persistence is installed through platform-specific mechanisms: a Windows HKCU Run key (miasma-monitor)...
if sudo access is restricted... the worm tries to restore it by launching an Alpine container via the Docker socket with Privileged: true, mounting /etc/sudoers.d, and writing runner ALL=(ALL) NOPASSWD:ALL.
echo ‘runner ALL=(ALL) NOPASSWD:ALL’ > /mnt/runner ... sudo -n true
Stealth
22 techniques
Stealth
The first layer is a rotated 4,069-entry string table behind a decoder function, used at 15,715 call sites.
Active credential-stealing campaigns, such as Mini Shai-Hulud, Miasma, and Hades, embedding fake headers specifically engineered to fool AI-assisted review tools into marking code as benign.
It also scrapes GitHub Actions runner memory before committing the stolen data to a GitHub repository created through the victim's account
It also scrapes GitHub Actions runner memory directly reading from /proc/*/mem on Linux runners to extract OIDC tokens and masked secrets in their unmasked form.
Если владелец отзывает токен, запускается команда удаления файлов из домашнего каталога и директории Documents (в Linux за это отвечает сервис systemd, в macOS — LaunchAgent).
Furthermore, it incorporates a dead man's switch that monitors a stolen token and triggers a directory wipe if the token is revoked...
To bury the entry within Git’s history, the attacker manually backdated the commit timestamp to March 9, 2020. Because many Git interfaces display history based on the commit’s authored date rather than the actual push date, this backdoor commit was hidden years deep in the historical logs.
Les identifiants ciblés comprennent clés IAM, jetons OIDC, jetons Entra ID, comptes de service GCP, PATs et clés API; la liste inclut T1078 — Valid Accounts.
It requests id-token: write, which grants access to a GitHub OIDC token that can be exchanged for npm publish credentials via npm’s trusted publishing.
TeamPCP modified tools including, but not limited to, Trivy, KICS, LiteLLM, and the Telnyx Python SDK. These tools are commonly integrated into enterprise development continuous integration (CI)/continuous delivery (CD) pipelines, cloud infrastructure, and security workflows.
At runtime, the ROT-N shell decodes and evals the inner wrapper, which decrypts Section A (bun guard) and Section B (payload)...
The first-stage code launched a detached Node.js process and retrieved an encrypted second-stage payload from IPFS.
The pre-flight also detects malware analysis environments through known fake environment variables, docker containers... and known security tools by process name and file path.
the malware performs a local check for Russia, and if there’s a match, it terminates its process.
A second-stage script, which contains configuration details and the main runtime, is retrieved from the IPFS peer-to-peer content delivery network and launched as a hidden process.
The payload is a single JavaScript line padded with approximately 1,000 leading spaces, placing the actual code far off-screen to the right.
The malware does not rely on the usual install scripts... Instead it springs to life when any application or build tool loads the poisoned module.
в новой волне атак изменился способ запуска малвари: вредоносные релизы больше не используют lifecycle-хуки в package.json. Вместо этого код выполняется во время установки через файл binding.gyp.
The compromised releases shipped a *-setup.pth file that attempts to execute automatically during Python startup, download the Bun JavaScript runtime, and run an obfuscated JavaScript payload named _index.js.
The langchain-core-mcp variant goes further by installing a .pth loader that searches sys.path for _index.js, meaning the loader and payload do not need to live in the same wheel.
The packages contained newly added installation-time execution mechanisms, including preinstall scripts that automatically invoked a malicious index.js file 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
Defense Impairment
3 techniques
Defense Impairment
Это наделяет вредоноса возможностями червя, позволяет обойти двухфакторную аутентификацию npm
If the token has admin access, it also attempts to commit directly to the default branch by temporarily removing branch protection rules.
Defense evasion: The malware attempts to neutralize security controls
Credential Access
13 techniques
Credential Access
извлекает данные из памяти раннера GitHub Actions
including direct extraction from runner process memory via /proc/*/mem
Credential theft: the payload collects cloud, CI, package registry, SSH, AI coding tool and wallet credentials
The full list of credential categories includes... browser session data on developer machines.
Credential files targeted from disk include .npmrc, .aws/credentials, kubeconfig, id_rsa/id_ed25519, .vault-token, .netrc, .docker/config.json, and google_credentials.json.
Bitbison’s sandbox recorded reads from 51 credential stores, including .aws/credentials, .npmrc, .pypirc, .gem/credentials
It looks for more than one hundred environment variable names spanning source control, package registries, major cloud providers, container platforms, secret managers, and popular AI services.
The malware as we’ve already discussed steals GitHub tokens, npm tokens, AWS, GCP & Azure cloud credentials, and local environment information.
Collection of GITHUB_TOKEN, AWS_ACCESS_KEY_ID, cloud credential env vars
password managers, operating system keychains, cryptocurrency wallets and AI coding tools
including browser-saved passwords from multiple browsers.
Это наделяет вредоноса возможностями червя, позволяет обойти двухфакторную аутентификацию npm
The report warns that these campaigns exploit “transitive trust” in software supply chains, turning maintainer accounts, CI/CD tokens and cloud credentials into high-value targets
Discovery
12 techniques
Discovery
Scans for git repositories across the same system volume/partition
each beacon includes redacted previews of PATH, HOME, USER, and HOSTNAME
The pre-flight also detects malware analysis environments through known fake environment variables, docker containers, sudo restrictions on GitHub Actions, and known security tools by process name and file path.
Even with reconnaissance switched off, those messages contained redacted previews of environment information and checked for configuration files tied to developer tools.
...checked for configuration files tied to developer tools.
One of the main changes in this new variant is the addition of new data collectors focused on cloud identities. Specifically, collectors for GCP and Azure identities were added that collect all identities the infected machine has access to.
The pre-flight also detects malware analysis environments through known fake environment variables, docker containers... and known security tools by process name and file path.
the malware performs a local check for Russia, and if there’s a match, it terminates its process.
Each beacon includes redacted previews of PATH, HOME, USER, and HOSTNAME, and checks for the presence of Cursor, Claude, and VS Code config files under /app.
When a GitHub token is found it can list reachable repositories and CI context through public APIs.
the payload checks the system locale through Intl.DateTimeFormat and the LC_ALL, LC_MESSAGES, LANGUAGE and LANG variables
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
5 techniques
Lateral Movement
Кроме того, Miasma поддерживает боковое перемещение через SSH и AWS Systems Manager...
SshMutator - Lateral movement using SSH credentials, scp and ssh based remote exec
The Register has been covering the story of the Shai-Hulud JavaScript worm for months. We introduced this self-propagating worm in September.
используя похищенные токены, Miasma стремится опубликовать зараженные версии всех пакетов, к которым имеет доступ жертва... превращает заражение в самораспространяющуюся атаку на цепочку поставок
...enabling command-and-control, persistence, decentralized fallback channels, and the potential for credential harvesting and propagation.
Collection
4 techniques
Collection
Once installed, the malware appears to accept remote commands for file operations, directory listing, and data exfiltration.
The malware ... drops a workflow named "Run Copilot" to capture CI/CD environment secrets from the runner memory.
extracting sensitive data, including but not limited to cloud access tokens, SSH keys, and Kubernetes secrets
the Miasma malware will create a gzip file of the JSON.stringify(...) of all credentials and tokens and send it to the CNC server.
Command and Control
9 techniques
Command and Control
The second stage delivers a modular runtime called Miasma. That framework can talk to remote servers... Primary control servers sat at a single IP on ports 8080, 8081, and 8091, with fallback discovery over several decentralized networks.
The primary HTTP infrastructure runs on 85.137.53.71... :8080 C2 command server ... :8081 Exfil / data upload ... :8091 Proxy management
The framework bundles 744 modules and is built as a command framework that supports six independent command-and-control (C2) communication channels using HTTP, Nostr relay, IPFS, BitTorrent DHT, libp2p GossipSub P2P mesh, and an Ethereum smart contract.
The entire C2 layer runs through GitHub’s commit search API, and the worm uses three independent channels... The attacker “issues commands” to all currently infected machines by simply committing a signed message to any public GitHub repository.
reuses those credentials to ... (3) stage stolen secrets in throwaway 'dead-drop' repos
containing a multi-stage dropper with an infostealer logic
When triggered, the script performs basic network checks and retrieves the Bun JavaScript runtime binary, saving it under ~/.bun.
Researchers said the payload could maintain access, run remote commands, handle files, update itself, and communicate with attacker-controlled infrastructure... researchers described it as a Miasma-associated RAT
Miasma also used an Ethereum contract as a fallback source for command-and-control configuration, including alternative endpoints, relay information, and bootstrap data.
Exfiltration
5 techniques
Exfiltration
Results are encrypted with AES-256-GCM, with the key wrapped using RSA-OAEP-SHA256, and posted to hxxps://paleasbest[.]top/v1/api
identifying StepSecurity domains and sandboxes and falling back to DNS-based exfiltration when conventional channels are blocked.
Stolen credentials are once again exfiltrated to attacker-controlled GitHub repositories.
The FBI confirmed two GitHub repository names used for exfiltration: tpcp-docs and docs-tpcp.
Stolen credentials do not go to a traditional C2 server with a suspicious IP. They go to GitHub. The malware authenticates with the victim’s own stolen GitHub token, creates a new public repository on the victim’s account... and uploads the encrypted credential payload as JSON files under a results/ directory
Impact
3 techniques
Impact
If the token is revoked and the API returns HTTP 40x, the malware executes rm -rf ~/ on the infected machine wiping the developer’s home directory.
If the API returns any 40x response – token revoked, token expired, account suspended. It executes that handler. rm -rf ~/ is thorough.
Miasma was a variant of Mini Shai-Hulud that propagated across those same open-source registries while harvesting credentials and poisoning configuration files.
Observables
174 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
127 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.