The Miasma worm source code briefly leaked on GitHub

Security researchers warn that Miasma—a credential-stealing attack framework that evolved from Shai-Hulud—was briefly leaked on GitHub via compromised accounts. The self-propagating malware harvests cloud, CI/CD, and secret-store credentials to taint npm, PyPI, and RubyGems packages—as well as GitHub repositories and Actions workflows—with no external C2, using GitHub as its control plane. The leak reveals features like a dead-man switch that wipes the user's home and Documents if a stolen token is revoked, plus a five-stage, uniquely encoded build pipeline to thwart detection. The incident underscores growing open-source supply-chain risk and urges developers to pin dependencies, delay updates, and verify every build in isolated environments.

TechLogHub
June 10, 2026
4 min read
0 views

Share Article

The Miasma worm source code briefly leaked on GitHub

The Miasma Source Code Leak: A Deep Dive into a Worm’s Open-Source Release

Overview

  • A credential-stealing attack framework known as Miasma was briefly exposed on GitHub, signaling a new phase in supply-chain style intrusions targeting open-source ecosystems.
  • Miasma is said to be an evolution of the earlier Shai-Hulud worm, incorporating many of the same techniques and design choices, including autonomous propagation and credential harvesting.
  • The leak suggests a self-propagating malware model that can quickly broaden its reach by abusing stolen credentials to compromise downstream packages, repositories, and automation workflows.

Background and Context

  • The incident follows a pattern of high-profile compromises where attackers leverage developer environments to access package registries, CI/CD systems, and project repositories.
  • Historical links point to Shai-Hulud as a predecessor, with both projects sharing code pathways and operational concepts.
  • SafeDep researchers reported that the leaked Miasma source code appeared in several compromised developer accounts in a repository titled “Miasma-Open-Source-Release,” indicating a deliberate release rather than an accidental disclosure.

Leak Details and Presentation

  • The leaked files included a complete toolkit intended for abuse in credential theft and downstream infection of open-source components.
  • Visual references accompanying the report show a set of source files and a build workflow, underscoring the sophistication of the released material.
  • Observations emphasize that the toolkit is designed to function without a traditional command-and-control server, instead leaning on GitHub as an operational channel for orchestration.

Key Capabilities and Techniques

  • Credential harvesting at multiple layers of the software supply chain, including:
  • Cloud provider credentials
  • CI/CD system tokens
  • Password managers
  • Kubernetes secrets
  • Secret stores
  • Mechanisms to weaponize stolen credentials to co-opt npm, PyPI, RubyGems packages, as well as GitHub repositories and Actions workflows.
  • Lateral movement capabilities through SSH and AWS Systems Manager (SSM).
  • Ability to poison configurations of AI coding tools and services used by developers.
  • Intrinsic reliance on GitHub-based channels for propagation and coordination.

Architecture and Operational Characteristics

  • The framework operates in a self-contained fashion with no external C2 infrastructure required.
  • An architectural diagram and accompanying visuals outline how components interact and propagate within a target environment.
  • The access and propagation model centers on compromising development environments to presenter payloads and manipulated dependencies.

Dead-Man Switch and Safety Mechanisms

  • A notable feature disclosed in the leak is a “dead-man switch” activated by the victim’s GitHub token.
  • The monitoring component checks token validity at short intervals (about once per minute); if the token is revoked, a destructive sequence is triggered.
  • The destructive sequence can wipe user data from home and Documents directories, using commands like rm -rf to erase local evidence.
  • The watchdog operates as a systemd user service on Linux or as a LaunchAgent on macOS, with activity lasting up to 72 hours.

Five-Stage Build Pipeline and Obfuscation

  • An advanced multi-stage build process creates unique payloads for each build, increasing difficulty for defenders attempting static analysis.
  • The pipeline employs:
  • Per-file AES-256-GCM encryption of embedded assets
  • Randomized string obfuscation
  • Source transformations and JavaScript obfuscation
  • A self-extracting loader that encapsulates the payload within multiple encryption layers
  • Independent random keys and an outer encoding layer ensure that every generated sample differs from prior iterations, complicating signature-based detection and repeatable analysis.

Impact on Open-Source Ecosystems

  • The leak is expected to influence attacker behavior by providing a ready-made framework that can be repurposed to target a broad range of ecosystems.
  • With open-source supply chains under ongoing strain, such disclosures heighten concern over the integrity of dependencies, registries, and automation workflows.
  • Historical parallels to Shai-Hulud show that leaked source code can accelerate the deployment of more aggressive variants and broaden attack surfaces.

Historical Linkages and Implications

  • The emergence of Miasma follows earlier incidents in which Shai-Hulud-inspired campaigns Trojanized packages and exploited developer credentials.
  • The cycle—leak, adaptation, broader deployment—highlights how open-source ecosystems remain a frequent target for supply-chain intrusions.
  • The availability of a ready-made toolkit elevates the risk of rapid replication by threat actors, potentially increasing the volume and velocity of attacks in the near term.

Visual Aids and Documentation

  • Imagery and diagrams accompanying the disclosure illustrate the structure of the toolkit and its integration points within target environments.
  • References to the SafeDep analysis provide a factual basis for understanding how the leak disseminated and how the components are intended to function.

Concluding Reflections

  • The brief GitHub exposure of Miasma’s source code underscores the ongoing vulnerabilities in modern software supply chains.
  • By examining the leaked material, defenders can better comprehend the ways attackers exploit developer environments, repositories, and automation tools.
  • The incident reinforces the need for vigilance around credential management, dependency pinning, and careful validation of new builds within isolated environments.

Related Context and Notes

  • The broader conversation around this leak intersects with prior coverage of related incidents, including attacks on npm packages and the compromise of open-source workflows.
  • The release of the source code—whether accidental or deliberate—serves as a reminder that open-source ecosystems, while powerful, can be leveraged to amplify malicious activity if not properly secured.

Stay Updated

Get the next deep dive in your inbox

Subscribe for product analysis, engineering explainers, and practical guides published on TechLogHub.

See what launched this week

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

The Miasma worm source code briefly leaked on GitHub | The Miasma Worm Source Code Breifly Leaked On Github | TechLogHub