<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3" -->

---
title: Shai-Hulud: Whoever controls your package registry...
description: A deep dive into the Shai-Hulud npm worm and its evolving variants (Shai-Hulud 2.0, Mini Shai-Hulud, and ChainDrop), which self-propagate through package...
canonical: https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Shai-Hulud: Whoever controls your package registry controls your pipeline | daily.dev
og:description: A deep dive into the Shai-Hulud npm worm and its evolving variants (Shai-Hulud 2.0, Mini Shai-Hulud, and ChainDrop), which self-propagate through package...
og:url: https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3
og:image: https://api.daily.dev/og/posts/eI6P8MPz3.png
og:image:alt: Shai-Hulud: Whoever controls your package registry controls your pipeline
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shai-Hulud: Whoever controls your package registry controls your pipeline

**[The New Stack](https://daily.dev/sources/newstack)** · 8 min read · 0 upvotes · 0 comments

## Summary

A deep dive into the Shai-Hulud npm worm and its evolving variants (Shai-Hulud 2.0, Mini Shai-Hulud, and ChainDrop), which self-propagate through package registries by stealing credentials and republishing malicious versions. ChainDrop, appearing August 4, 2026, compromised over 400 packages within four hours by riding a legitimate signed release pipeline, obtaining valid SLSA provenance attestations and hiding command infrastructure in an Ethereum smart contract. The piece argues the same mechanics apply to Terraform providers and modules, and recommends pinning dependencies to immutable references (commit SHAs, lock file checksums), using curated private registries, scoping credentials to short-lived per-deployment tokens via OIDC, and restricting runner egress to prevent exfiltration.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thenewstack.io/shai-hulud-pipeline-security>

## Questions this post answers

### What is the Shai-Hulud npm worm and how does ChainDrop differ from earlier variants?

Shai-Hulud is a self-propagating npm supply chain worm first seen around September 15, 2025, that steals credentials via a postinstall script and republishes itself into every package a compromised developer maintains. Its ChainDrop variant, appearing August 4, 2026, compromised over 400 packages in under four hours by hijacking a legitimate signed release pipeline, giving poisoned versions valid SLSA provenance attestations and hiding command infrastructure inside an Ethereum smart contract.

_Teams hardening CI/CD pipelines against supply chain worms can track attacks like ChainDrop on daily.dev._

### How do I protect Terraform providers and modules from supply chain attacks like npm worms?

Pin every dependency to an immutable reference: rely on Terraform's .terraform.lock.hcl checksums (recorded since Terraform 0.14) and pin module sources to a full commit SHA rather than a branch or tag, since tags can be moved or deleted. Also route resolution through a private, curated registry, use short-lived OIDC-issued credentials instead of standing secrets, and restrict runner egress to only necessary domains.

_Anyone locking down Terraform pipelines against credential theft can follow ongoing coverage on daily.dev._

### How does the Shai-Hulud worm steal and use credentials once it infects a machine?

A compromised npm package runs a postinstall script, historically a file called bundle.js, that searches for npm and GitHub tokens, AWS or GCP secrets, and cloud instance metadata, then downloads the open-source tool Trufflehog to validate any credentials found. With a GitHub token it exfiltrates data to a public repo and can make private repos public; with an npm token it republishes every package the developer maintains with the worm injected.

_Developers auditing dependency risk after a credential leak can follow supply chain security updates via daily.dev._

---

Tags: [#cyber](https://daily.dev/tags/cyber), [#terraform](https://daily.dev/tags/terraform), [#npm](https://daily.dev/tags/npm)

[View this post on daily.dev](https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Shai-Hulud: Whoever controls your package registry controls your pipeline","url":"https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3"},"datePublished":"2026-08-31T16:02:57.721Z","dateModified":"2026-08-31T16:03:27.214Z","description":"A deep dive into the Shai-Hulud npm worm and its evolving variants (Shai-Hulud 2.0, Mini Shai-Hulud, and ChainDrop), which self-propagate through package...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ec504ef8a8f79e5ab6c1f23957a59446?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ec504ef8a8f79e5ab6c1f23957a59446?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The New Stack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The New Stack","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/newstack","url":"https://daily.dev/sources/newstack"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cyber,terraform,npm","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The New Stack","item":"https://daily.dev/sources/newstack"},{"@type":"ListItem","position":3,"name":"Shai-Hulud: Whoever controls your package registry controls your pipeline"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/shai-hulud-whoever-controls-your-package-registry-controls-your-pipeline-ei6p8mpz3#faq","mainEntity":[{"@type":"Question","name":"What is the Shai-Hulud npm worm and how does ChainDrop differ from earlier variants?","acceptedAnswer":{"@type":"Answer","text":"Shai-Hulud is a self-propagating npm supply chain worm first seen around September 15, 2025, that steals credentials via a postinstall script and republishes itself into every package a compromised developer maintains. Its ChainDrop variant, appearing August 4, 2026, compromised over 400 packages in under four hours by hijacking a legitimate signed release pipeline, giving poisoned versions valid SLSA provenance attestations and hiding command infrastructure inside an Ethereum smart contract. Teams hardening CI/CD pipelines against supply chain worms can track attacks like ChainDrop on daily.dev."}},{"@type":"Question","name":"How do I protect Terraform providers and modules from supply chain attacks like npm worms?","acceptedAnswer":{"@type":"Answer","text":"Pin every dependency to an immutable reference: rely on Terraform's .terraform.lock.hcl checksums (recorded since Terraform 0.14) and pin module sources to a full commit SHA rather than a branch or tag, since tags can be moved or deleted. Also route resolution through a private, curated registry, use short-lived OIDC-issued credentials instead of standing secrets, and restrict runner egress to only necessary domains. Anyone locking down Terraform pipelines against credential theft can follow ongoing coverage on daily.dev."}},{"@type":"Question","name":"How does the Shai-Hulud worm steal and use credentials once it infects a machine?","acceptedAnswer":{"@type":"Answer","text":"A compromised npm package runs a postinstall script, historically a file called bundle.js, that searches for npm and GitHub tokens, AWS or GCP secrets, and cloud instance metadata, then downloads the open-source tool Trufflehog to validate any credentials found. With a GitHub token it exfiltrates data to a public repo and can make private repos public; with an npm token it republishes every package the developer maintains with the worm injected. Developers auditing dependency risk after a credential leak can follow supply chain security updates via daily.dev."}}]}
```

