Miasma supply chain worm leaked June 2026 - PAT stealer and CI/CD attack diagram

The Miasma supply chain worm toolkit was leaked on June 10, 2026, and the clock is now ticking on every public package registry, CI/CD pipeline, and developer laptop that has touched a Personal Access Token in the last twelve months. Researchers at SafeDep and the Rescana ThreatsDay team have confirmed that the leak contains a fully weaponised, multi-stage worm targeting PyPI, npm, RubyGems, JFrog Artifactory, GitHub repositories, and GitHub Actions — the same general attack surface that the Shai-Hulud worm exploited in 2024, but with a fresh Python variant nicknamed Hades and a far more sophisticated command-and-control channel.

This is not a theoretical risk. Miasma hides its C2 inside commit history, exfiltrates PATs, and self-propagates through SSH keys the moment it lands on a build server. The good news: the IOCs are public, the propagation is loud if you are looking, and most of the damage can be stopped with seven concrete actions you can start before lunch. This guide walks through what Miasma actually does, what got leaked, and the priority order for the work your team should be doing this week.

1. Understand what Miasma actually is — and what just hit the wild

Miasma is a modular, multi-stage supply chain attack framework, not a single payload. The leak dropped the full builder, the propagation engine, and a curated list of pastes and commit-history strings used as dead-drop resolvers. According to SafeDep's writeup, the toolkit embeds unique search strings and cryptographic keys inside GitHub commit histories to act as C2 beacons. Three strings have already been publicly tied to Miasma modules:

  • DontRevokeOrItGoesBoom — the marker for Personal Access Token exfiltration modules.
  • TheBeautifulSandsOfTime — the marker for the JavaScript payload delivery stage that targets npm packages.
  • firedalazer — the marker for the Python remote code execution backdoor that drives the new Hades variant.

The worm is a direct descendant of Shai-Hulud, which hit npm in late 2024. Miasma uses the same playbook — compromise a maintainer, inject a build-time payload, ride the trust graph — but extends it to Python, Ruby, and self-hosted artifact servers, and the leak has dropped the skill floor from APT-grade to copy-paste.

2. Rotate every long-lived Personal Access Token your team has issued

Miasma's first move on a compromised laptop is to walk the local credential stores for GitHub, GitLab, and Bitbucket PATs, plus any tokens cached in ~/.npmrc, ~/.pypirc, or ~/.netrc. Long-lived classic PATs are the single highest-value target. Replace them with fine-grained, short-lived, repository-scoped tokens, and force SSO + hardware-key approval on every organisation you control. If you are still handing out classic tokens with repo, workflow, or admin:org scopes, the leak just turned those tokens into a fast-spreading worm fuel source.

For teams that need to keep a deploy-time token around, prefer OIDC federation between your CI provider and your cloud — GitHub Actions OIDC to AWS, Azure, or GCP is now the default secure pattern and removes the static secret entirely. The defender payoff is enormous: even if a Miasma operator steals a runner's identity, the token it walks away with is useless outside the workflow that minted it.

3. Lock down CI/CD before you do anything else

Most Miasma propagation happens through GitHub Actions, GitLab Runners, and Jenkins agents that have been granted write access to a downstream repository or package registry. Audit your top 20 workflows today and apply three changes: pin every action by full-length commit SHA (not a tag — tags move), set permissions: to the minimum the job needs, and turn on persist-credentials: false on every actions/checkout step. These three settings alone stop the majority of lateral-movement patterns Miasma uses.

For self-hosted runners, assume any runner that has executed an untrusted workflow is burned. Rebuild the image from a known-good base, rotate the runner registration token, and require the runner to live behind a network boundary with explicit egress allowlists. If you need a controlled observation channel, route runner traffic through a managed VPN tunnel you can log on both ends.

4. Hunt for the IOCs in your commit history right now

Because Miasma stores C2 strings in commit messages and code comments, the fastest defensive move is a repository-wide search. Run a one-liner against every mirror you maintain:

git log --all -p | grep -E -i "DontRevokeOrItGoesBoom|TheBeautifulSandsOfTime|firedalazer"

If any of those strings show up in a commit that did not come from a known defender write-up, treat the repository as compromised. Pull the actor's commits, look at every file they touched, and check whether any of those files shipped in a published artifact. SafeDep and Socket have both published broader IOC feeds with hash and package-name data; wire them into your EDR and your package mirror's deny-list today, not next sprint.

5. Lock the package registries you operate or mirror

If you run an internal PyPI, npm registry, or JFrog Artifactory, you are a high-value Miasma target — the worm specifically looks for self-hosted artifact servers with weak auth. Four changes get you 80% of the way: enable mandatory SSO + MFA on every publisher account, disable legacy __token__ basic-auth publishing in favour of scoped, time-bound OIDC tokens, require package signing (sigstore / npm provenance / PEP 740), and block any package whose name is a single-character typo of an internal top-100 package. The typo-squatting pattern is the easiest supply-chain trick in the book and Miasma uses it as its initial foothold vector.

For developers consuming packages, use a lockfile resolver that pins exact versions, blocks install-scripts by default, and supports a curated allow-list. Audit transitive dependencies with npm audit signatures or pip-audit, and run Renovate or Dependabot to keep the lockfile current.

6. Add Egress Controls and DNS Monitoring to Every Build Network

Miasma's C2 channel looks like ordinary HTTPS traffic to a GitHub commit, which is why egress monitoring matters more than inbound. Configure your CI network to alert on the first outbound connection to a host that resolves to a raw IP, on any TLS connection that does not present a certificate from a known-good CA, and on any DNS query for the marker strings above. Tools like Zeek, Corelight, or even a well-tuned Suricata rule set will flag the C2 beacon on the first packet. Pair that with explicit deny-by-default egress on every build subnet, and you turn a silent propagation into a noisy incident that gets noticed in minutes instead of days.

7. Plan for the incident, not just the prevention

Even with all of the above, treat the next two weeks as "if, not when" for a Miasma exposure. Pre-stage an incident runbook: who has authority to revoke a leaked PAT, who can force-pause a registry, and who owns the public disclosure if a customer-facing package is implicated. Practice a tabletop that walks the runbook end-to-end, because the most expensive minutes in any supply-chain incident are the ones spent figuring out who can press which button.

For a self-hosted lab that doubles as a CI playground, harden the box itself with a managed UPS battery backup so a sudden power event does not corrupt your audit logs mid-incident, and consider a rack-mountable enclosure with locked front panels if you host a runner in a shared space.

What to do in the next 72 hours

If you only have time for a short list: rotate every long-lived PAT, pin every GitHub Action by SHA, and run the IOC grep against your top 50 repositories. That sequence blocks the highest-probability Miasma paths, costs almost nothing, and buys you the time to do the rest of the work properly. Watch the CISA KEV catalogue for related advisories — the weekend of June 14-15 already had Ivanti Sentry and Oracle PeopleSoft patches due, and the supply-chain space rarely stays quiet for long after a leak of this size.

Affiliate Disclosure: GeniusTechLab is reader-supported. When you purchase through links on our site, we may earn an affiliate commission at no extra cost to you. Our recommendations are based on hands-on testing and editorial judgment, not commission rates.