Skip to main content
Mallory
MalwareUsed by 1 actor

Miasma

Miasma is a credential-stealing, self-propagating npm supply-chain worm and a variant or descendant of the open-sourced Mini Shai-Hulud malware framework. It was observed in June 2026 in compromises of the @redhat-cloud-services npm namespace, where at least 32 packages and 96 malicious versions were published, and in a subsequent broader npm campaign affecting additional packages. Multiple reports state the malware was introduced through malicious npm preinstall hooks or, in later reporting, abuse of binding.gyp execution during npm install. In the Red Hat incident, evidence indicated a compromised Red Hat employee GitHub account was used to push orphan commits and malicious GitHub Actions workflows that abused GitHub OIDC trusted publishing to publish trojanized packages with valid SLSA provenance. The malware self-identified with the marker "Miasma: The Spreading Blight."

Miasma is heavily obfuscated and multi-stage. Reports describe large obfuscated JavaScript droppers around 4.2-4.5 MB that used ROT-based decoding, eval, AES-128-GCM, and additional custom string or cipher layers. The malware downloaded the Bun runtime and executed later stages through Bun, creating a node-to-shell-to-bun process chain intended to evade Node-focused monitoring. Some reporting states each infection generated a uniquely encrypted payload, limiting the usefulness of hash-based IOCs.

Its primary purpose is credential and secret theft rather than disruption. Across the reporting, Miasma targeted GitHub and GitHub Actions tokens and secrets, npm tokens, AWS, GCP, and Azure credentials, HashiCorp Vault tokens, Kubernetes configuration and tokens, CircleCI and other CI/CD secrets, SSH keys, Docker credentials, GPG keys, .env contents, browser or wallet data, and local developer secrets such as ~/.npmrc, ~/.docker/config.json, ~/.kube/config, and ~/.ssh. Multiple sources state it scraped GitHub Actions runner memory on Linux to recover masked secrets, and some reporting notes attempts at privilege escalation via passwordless sudo and defense evasion such as /etc/hosts modification. Linux-based developer and CI/CD environments appear to have been a primary target.

Miasma also retains worm-like propagation behavior from Mini Shai-Hulud. It used stolen npm tokens, including tokens with bypass_2fa capability, to enumerate packages the victim could publish and republish them with the malicious payload. Reporting also states it could inject malicious workflow files or setup scripts into accessible GitHub repositories and create repositories bearing the description "Miasma: The Spreading Blight." Some analyses additionally reported persistence or backdoor mechanisms involving Claude Code, Cursor, Gemini, and VS Code configuration files.

Attribution remains uncertain. Multiple sources link the malware lineage and tradecraft to TeamPCP's Mini Shai-Hulud tooling, but also explicitly note that the framework was publicly released, enabling copycat actors. High-confidence indicators mentioned in the reporting include the campaign marker "Miasma: The Spreading Blight," GitHub repositories created with that description, attacker-controlled GitHub infrastructure including github.com/liuende501 in one campaign, Bun download URLs for bun-v1.3.13, the decoy token string "IfYouInvalidateThisTokenItWillNukeTheComputerOfTheOwner," and in one report the fake User-Agent "python-requests/2.31.0."

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

THREAT ACTORS

Groups observed using it

1 distinct threat actor attributed by public researchers. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details
TeamPCP

What is Miasma? Analysis of the compromised package versions identified a common malicious payload introduced across multiple affected releases... The payload appears to be derived from the (Mini) Shai-Hulud malware open-sourced by TeamPCP... This variant creates repositories containing the description Miasma: The Spreading Blight.

via ramimac blogramimac.me
MITRE ATT&CK

Techniques & procedures

30 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

5 techniques
T1078Valid AccountsEvidence1

Use stolen maintainer credentials to create and publish malicious package artifacts.

T1078.004Cloud AccountsEvidence1

The executed code scans for and attempts to exfiltrate the following: AWS, GCP, and Azure cloud credentials

T1195Supply Chain CompromiseEvidence5

Shai-Hulud has re-emerged in a campaign with 281 malicious package versions across the npm ecosystem. This latest wave is part of the campaign dubbed “Miasma: The Spreading Blight” and abuses trust in open source packages to spread through software supply chains.

T1195.001Compromise Software Dependencies and Development ToolsEvidence3

The attack compromised 57 npm packages across more than 286 malicious versions on June 3, 2026.

T1199Trusted RelationshipEvidence1

allowing attackers to publish trojanized packages through the legitimate GitHub Actions OpenID Connect (OIDC) publishing workflow. As a result, the malicious packages carried authentic provenance signatures

Execution

5 techniques
T1059Command and Scripting InterpreterEvidence2
TacticExecution

Instead of hiding inside package.json scripts, the attacker weaponized a tiny configuration file called binding.gyp to trigger malicious code the moment a developer runs npm install.

T1059.007JavaScriptEvidence1
TacticExecution

each compromised package added a preinstall script that ran a bloated, heavily obfuscated index.js loader, which then pulled down and executed a payload

T1204User ExecutionEvidence1
TacticExecution

The infection begins automatically during npm install, where the malicious preinstall hook executes node index.js without requiring user interaction.

T1574Hijack Execution FlowEvidence2

The malware also injects backdoor configuration files into AI coding assistants like Claude Code, Cursor, and Gemini, so every AI-assisted suggestion inside a poisoned project could be quietly influenced by the attacker.

T1574.007Path Interception by PATH Environment VariableEvidence1

The packages contained newly added installation-time execution mechanisms, including preinstall scripts that automatically invoked a malicious index.js file during package installation.

Persistence

4 techniques
T1078Valid AccountsEvidence1

Use stolen maintainer credentials to create and publish malicious package artifacts.

T1078.004Cloud AccountsEvidence1

The executed code scans for and attempts to exfiltrate the following: AWS, GCP, and Azure cloud credentials

T1546Event Triggered ExecutionEvidence1

The attack begins in package.json , where a weaponized preinstall hook automatically executes during npm install, allowing the malware to run through both direct and transitive dependency installation.

T1556Modify Authentication ProcessEvidence1

The malware also attempted to propagate by compromising additional maintainer packages... republished poisoned packages with forged Supply-chain Levels for Software Artifacts (SLSA) provenance to continue downstream propagation.

T1078Valid AccountsEvidence1

Use stolen maintainer credentials to create and publish malicious package artifacts.

T1078.004Cloud AccountsEvidence1

The executed code scans for and attempts to exfiltrate the following: AWS, GCP, and Azure cloud credentials

T1546Event Triggered ExecutionEvidence1

The attack begins in package.json , where a weaponized preinstall hook automatically executes during npm install, allowing the malware to run through both direct and transitive dependency installation.

T1548Abuse Elevation Control MechanismEvidence1

Privilege escalation : It installs a passwordless sudo rule to obtain elevated privileges and maintain deeper system control.

T1548.003Sudo and Sudo CachingEvidence1

echo ‘runner ALL=(ALL) NOPASSWD:ALL’ > /mnt/runner ... sudo -n true

Stealth

6 techniques
T1027Obfuscated Files or InformationEvidence4
TacticStealth

The payload is buried under four layers of obfuscation including a ROT cipher, AES-128-GCM encryption, and a runtime-switching trick that downloads the Bun JavaScript runtime in under one second to execute the final stage outside of Node.js.

T1036MasqueradingEvidence1
TacticStealth

The attacker embedded a shell command using gyp’s own command substitution syntax, silently launching a malicious payload while returning a fake source filename so the build shows no errors.

T1078Valid AccountsEvidence1

Use stolen maintainer credentials to create and publish malicious package artifacts.

T1078.004Cloud AccountsEvidence1

The executed code scans for and attempts to exfiltrate the following: AWS, GCP, and Azure cloud credentials

T1574Hijack Execution FlowEvidence2

The malware also injects backdoor configuration files into AI coding assistants like Claude Code, Cursor, and Gemini, so every AI-assisted suggestion inside a poisoned project could be quietly influenced by the attacker.

T1574.007Path Interception by PATH Environment VariableEvidence1

The packages contained newly added installation-time execution mechanisms, including preinstall scripts that automatically invoked a malicious index.js file during package installation.

T1556Modify Authentication ProcessEvidence1

The malware also attempted to propagate by compromising additional maintainer packages... republished poisoned packages with forged Supply-chain Levels for Software Artifacts (SLSA) provenance to continue downstream propagation.

Credential Access

5 techniques
T1528Steal Application Access TokenEvidence1

The executed code scans for and attempts to exfiltrate the following: GitHub Actions secrets and access tokens ... npm and CircleCI tokens, plus other CI/CD secrets

T1552.005Cloud Instance Metadata APIEvidence2

API Endpoint http://169.254.169.254/latest/api/token AWS IMDSv2 endpoint targeted for cloud credential harvesting API Endpoint http://169.254.169.254/metadata/identity Azure IMDS endpoint targeted for cloud credential harvesting

T1555Credentials from Password StoresEvidence4

Once active, the malware operates as a comprehensive credential harvester purpose-built for CI/CD environments, targeting AWS keys, GCP credentials, Azure tokens, HashiCorp Vault tokens, GitHub Actions secrets, and 1Password vaults.

T1556Modify Authentication ProcessEvidence1

The malware also attempted to propagate by compromising additional maintainer packages... republished poisoned packages with forged Supply-chain Levels for Software Artifacts (SLSA) provenance to continue downstream propagation.

T1649Steal or Forge Authentication CertificatesEvidence4

It uses stolen npm tokens to enumerate every package a compromised maintainer owns, inject the binding.gyp payload into each one, and republish with forged SLSA provenance and Sigstore signing.

Discovery

3 techniques
T1057Process DiscoveryEvidence1
TacticDiscovery

The payload locates the GitHub Actions Runner.Worker PID using /proc scanning

T1087.004Cloud AccountEvidence1
TacticDiscovery

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.

T1526Cloud Service DiscoveryEvidence1
TacticDiscovery

Validate stolen credentials and enumerate accessible repositories, services, and permission levels.

Lateral Movement

1 technique
T1570Lateral Tool TransferEvidence1

The malware republishes packages owned by the compromised maintainer using forged provenance metadata, effectively allowing the threat to spread like a worm across trusted package ecosystems.

T1105Ingress Tool TransferEvidence2

The payload is buried under four layers of obfuscation including a ROT cipher, AES-128-GCM encryption, and a runtime-switching trick that downloads the Bun JavaScript runtime in under one second to execute the final stage outside of Node.js.

Exfiltration

3 techniques
T1041Exfiltration Over C2 ChannelEvidence1

Collect system, user, developer configuration, and CI/CD environment data. Search for GitHub access tokens, package registry authentication tokens, and cloud-related secrets.

T1567Exfiltration Over Web ServiceEvidence2

Stolen credentials are encrypted and uploaded to programmatically created repositories under the attacker-controlled GitHub account liuende501.

T1567.001Exfiltration to Code RepositoryEvidence1

Channel A (victim-owned repo drop): Creates a public repo in the victim’s GitHub account (“Miasma: The Spreading Blight”) and commits stolen credential JSON to results/<timestamp>-<counter>.json .

Impact

1 technique
T1485Data DestructionEvidence1
TacticImpact

If the malware detects interaction with a planted decoy token, it triggers a destructive fail-safe command ( rm -rf ~/ ) intended to wipe the victim’s home directory.

Other

1 technique
T1562Impair DefensesEvidence1

Defense evasion: The malware attempts to neutralize security controls

INDICATORS OF COMPROMISE

IOCs tracked for this family

32 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
1 tracked

IPs, domains, and DNS infrastructure linked to this family.

Hashes
27 tracked

File hashes (MD5, SHA-1, SHA-256) from samples and reports.

Other
4 tracked

Other indicator types observed in public reporting.

TypeValueLatest sighting
uri●●●●●●●●●●●●View more in apptoday
uri●●●●●●●●●●●●View more in apptoday
uri●●●●●●●●●●●●View more in apptoday
domain●●●●●●●●●●●●View more in app2 days ago
uri●●●●●●●●●●●●View more in app2 days ago
hash.sha256●●●●●●●●●●●●View more in app2 days ago
ACTIVITY FEED

Recent activity

13 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

cyber security newsNews
Jun 4, 2026
binding.gyp Supply Chain Attack Compromises Dozens of npm Packages Across Maintainer Accounts

A self-replicating npm supply-chain worm that executes during npm install via a malicious binding.gyp trigger. It steals CI/CD and cloud credentials, exfiltrates them to attacker-controlled GitHub repositories, uses stolen npm tokens to republish additional packages, forges supply-chain provenance/signing metadata, and injects backdoor configuration files into AI coding assistants.

Read more
zdnet zero dayNews
Jun 3, 2026
Red Hat hit by npm supply‑chain attack - here's how to stay safe | ZDNET

A variant of Mini Shai-Hulud that uses a malicious npm preinstall hook and multistage loader to exfiltrate secrets from GitHub, cloud, SSH, Kubernetes, Vault, npm, and CI/CD environments, while self-propagating by republishing packages the victim can publish.

Read more
phoenix security blogNews
Jun 2, 2026
Miasma: Red Hat npm Packages Hit by Shai-Hulud Variant

A credential-stealing, self-propagating npm supply-chain worm delivered via malicious preinstall hooks. It uses multi-layer obfuscation, decrypts embedded payloads executed via Bun, steals credentials from cloud/dev environments and GitHub Actions runner memory, exfiltrates data over HTTPS and the GitHub Contents API, and republishes malicious packages using stolen npm tokens with bypass_2fa enabled.

Read more
linuxsecurityNews
Jun 2, 2026
Red Hat npm Package Compromise Highlights Supply Chain Risks

Credential-stealing malware delivered via compromised npm packages in Red Hat's @redhat-cloud-services namespace. It targets Linux-based developer and CI/CD environments by searching for SSH keys, registry credentials, cloud credentials, Kubernetes configs, and CI/CD secrets.

Read more
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching32

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution1

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping30

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.