{"id":18046,"date":"2026-06-26T12:22:23","date_gmt":"2026-06-26T12:22:23","guid":{"rendered":"https:\/\/www.securitytoday.de\/?p=18046"},"modified":"2026-06-26T12:49:34","modified_gmt":"2026-06-26T12:49:34","slug":"mini-shai-hulud-npm-worm-devours-the-supply-chain","status":"publish","type":"post","link":"https:\/\/www.securitytoday.de\/en\/2026\/06\/26\/mini-shai-hulud-npm-worm-devours-the-supply-chain\/","title":{"rendered":"Mini Shai-Hulud: npm worm devours the supply chain"},"content":{"rendered":"<p style=\"color:#69d8ed;font-size:0.9em;margin:0 0 16px;padding:0;\">7 min read<\/p>\n<p><strong>On May 11, 2026, Microsoft Security Research reports a new wave of the npm worm Shai-Hulud: 170 affected npm packages and two PyPI packages, spread across 404 malicious package versions.<\/strong> This marks the first coordinated campaign to hit both npm and PyPI simultaneously. What\u2019s striking isn\u2019t the number-it\u2019s the design. Mini Shai-Hulud steals credentials and then spreads itself further, using the very same trusted publishing pipelines that hold modern software supply chains together.<\/p>\n<div style=\"background:#003340;color:#fff;padding:32px 36px;margin:32px 0;border-radius:8px;\">\n<p style=\"margin:0 0 18px 0;font-size:0.95em;font-weight:800;text-transform:uppercase;letter-spacing:0.2em;color:#69d8ed;border-bottom:2px solid rgba(105,216,237,0.25);padding-bottom:12px;\">Key Takeaways<\/p>\n<ul style=\"margin:0;padding-left:22px;color:rgba(255,255,255,0.92);line-height:1.6;\">\n<li><strong style=\"color:#69d8ed;\">The worm propagates itself:<\/strong> Stolen OIDC and publishing rights generate new malicious releases under legitimate maintainer identities-no fresh phishing access required.<\/li>\n<li><strong style=\"color:#69d8ed;\">Persistence beyond the package:<\/strong> The malware sometimes embeds itself in developer configurations, remaining active even after the infected package is removed.<\/li>\n<li><strong style=\"color:#69d8ed;\">Tokens are the gateway:<\/strong> Those using npm Trusted Publishing and WebAuthn instead of long-lived tokens close the primary infection vector.<\/li>\n<\/ul>\n<\/div>\n<p style=\"font-size:0.88em;color:#666;margin:20px 0 32px 0;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 0;\"><span style=\"color:#004a59;font-weight:700;text-transform:uppercase;font-size:0.72em;letter-spacing:0.14em;margin-right:14px;\">Related:<\/span><a href=\"https:\/\/www.securitytoday.de\/en\/2026\/06\/22\/the-splunk-vulnerability-that-deletes-log-files-without-authentication\/\" style=\"color:#333;text-decoration:underline;\">The Splunk vulnerability that deletes files without login<\/a>&nbsp;&nbsp;<span style=\"color:#ccc;\">\/<\/span>&nbsp;&nbsp;<a href=\"https:\/\/www.securitytoday.de\/en\/2026\/06\/20\/machine-identity-offboarding-owasp-nhi\/\" style=\"color:#333;text-decoration:underline;\">Machine identities in offboarding<\/a><\/p>\n<h2 style=\"margin-top:48px;margin-bottom:18px;\">A second wave, larger and more coordinated<\/h2>\n<p>Shai-Hulud isn\u2019t a new name. Between November 24 and December 1, 2025, the first wave compromised hundreds of npm packages, including components from ecosystems like Zapier, PostHog, Postman, ENS Domains, and AsyncAPI. The variant Microsoft documented in early May 2026, dubbed Mini Shai-Hulud, takes it a step further. It targets high-profile projects like TanStack, Mistral AI, UiPath, OpenSearch, and AntV-and for the first time, spans both major registries.<\/p>\n<p>The 404 malicious versions refer to the number of tampered package releases across the 170 npm and two PyPI packages. The figure has nothing to do with HTTP errors. For security teams, this shifts the focus: away from hunting individual rogue packages and toward tracking a chain of publications that feed off each other.<\/p>\n<h2 style=\"margin-top:48px;margin-bottom:18px;\">The Mechanics: preinstall runs before any test<\/h2>\n<p>The attack begins at the weakest point of the installation process. A malicious preinstall script in the package.json is executed automatically during installation-before any tests or security checks can intervene. This window of opportunity is the leverage. Within it, a setup script named <span style=\"font-family:monospace;background:#f4f4f4;padding:1px 5px;border-radius:3px;font-size:0.92em;\">set_bun.js<\/span> installs the alternative JavaScript runtime Bun if needed, then executes the actual payload from the file <span style=\"font-family:monospace;background:#f4f4f4;padding:1px 5px;border-radius:3px;font-size:0.92em;\">bun_environment.js<\/span>.<\/p>\n<p>What happens next is a systematic harvest. The malware downloads a GitHub Actions runner and deploys the credential scanner TruffleHog to extract secrets from repositories and environment variables. The loot is sent to repositories under the attackers&#8217; control. Far more than npm tokens are stolen: AWS SSO and IMDSv2 credentials, Azure, Google Cloud, and Kubernetes logins, SSH keys, local configuration secrets, and even crypto wallets.<\/p>\n<div style=\"background:#0a2e3d;border-radius:8px;padding:28px 32px;margin:32px 0;\">\n<div style=\"color:#69d8ed;font-size:2.4em;font-weight:800;line-height:1;margin-bottom:8px;\">404 Versions<\/div>\n<div style=\"color:#ffffff;font-size:1.02em;line-height:1.5;margin-bottom:10px;\">malicious package versions spread Mini Shai-Hulud across 170 npm and two PyPI packages, identified by Microsoft Security Research on May 11, 2026.<\/div>\n<div style=\"color:rgba(255,255,255,0.55);font-size:0.82em;\">Source: Microsoft Security Blog<\/div>\n<\/div>\n<h2 style=\"margin-top:48px;margin-bottom:18px;\">Why the worm survives long after the package is gone<\/h2>\n<p>The real leap beyond classic supply chain attacks lies in its propagation. Mini Shai-Hulud exploits stolen OIDC and publishing rights to release new malicious versions under the identities of legitimate maintainers. Through GitHub Trusted Publishing and npm lifecycle scripts, the attack spreads via trusted release channels-without attackers needing to phish anyone again.<\/p>\n<p>Even more unsettling is its persistence. According to Microsoft, the malware sometimes embeds itself via SessionStart hooks in the file <span style=\"font-family:monospace;background:#f4f4f4;padding:1px 5px;border-radius:3px;font-size:0.92em;\">.claude\/settings.json<\/span> and through the GitHub GraphQL API. This means the attack lingers in the developer environment-not just in the dependency. Removing the infected package and assuming the job is done overlooks the mechanism that reignites with every subsequent tool launch.<\/p>\n<h2 style=\"margin-top:48px;margin-bottom:18px;\">The new attack surface: AI dev tools and alternative runtimes<\/h2>\n<p>This is where the lesson extends beyond this single incident. The worm exploits not just classic npm scripts but also an alternative runtime like Bun and the hook files of modern AI coding tools-a persistence mechanism that traditional audits rarely scrutinize. An SBOM lists dependencies, but it doesn\u2019t account for hook configurations in developer setups.<\/p>\n<p>For incident response, this means expanding the scope. Investigating a supply chain compromise now requires examining AI assistant configuration files, local hook files, and non-Node runtimes. This isn\u2019t AI panic-it\u2019s the sobering realization that the CI\/CD attack surface has grown to include tools that weren\u2019t on every developer\u2019s machine two years ago.<\/p>\n<h2 style=\"margin-top:48px;margin-bottom:18px;\">Defense: Replace Tokens, Harden Identity, Sign the Pipeline<\/h2>\n<p>The good news is that the most effective measures are principles, not products. Microsoft and several security firms like Akamai, Snyk, and StepSecurity-reporting in parallel on the campaign-agree on a consistent core. Maintainers should adopt npm Trusted Publishing instead of long-lived tokens, as a stolen token fuels self-propagation. WebAuthn-based two-factor authentication offers stronger protection than TOTP, which can be phished. And commit signatures make tampered releases visible.<\/p>\n<p>For users, speed is critical. Anyone who might be affected should rotate exposed credentials immediately, not wait. Automated SBOM generation and agentless scanning help detect the tampered versions in the first place. Attack surface reduction rules can block obfuscated scripts before they execute. For German companies, there\u2019s also a legal dimension: NIS2 turns supply chain due diligence into a verifiable requirement. An incident like this becomes both a technical and a documentation issue.<\/p>\n<h2 style=\"padding-top:64px;margin-bottom:20px;\">Frequently Asked Questions<\/h2>\n<h3>What is Mini Shai-Hulud?<\/h3>\n<p>Mini Shai-Hulud is a variant of the npm worm Shai-Hulud from 2025. The wave documented by Microsoft on May 11, 2026, compromised 170 npm and two PyPI packages via 404 malicious versions, spreading autonomously through the software supply chain\u2019s publishing channels.<\/p>\n<h3>How does the worm infect a system?<\/h3>\n<p>Through a malicious preinstall script that executes automatically-and before any tests-when a package is installed. It installs the Bun runtime, downloads a payload, and scans for credentials using TruffleHog, which are then exfiltrated to the attackers.<\/p>\n<h3>Why isn\u2019t deleting the infected package enough?<\/h3>\n<p>Because the malware sometimes embeds itself outside the dependency, such as via SessionStart hooks in AI coding tool configurations or through the GitHub GraphQL interface. This persistence triggers on every tool startup, even if the package has long since been removed.<\/p>\n<h3>Which credentials are affected?<\/h3>\n<p>Stolen credentials include npm tokens, AWS SSO and IMDSv2 access, Azure, Google Cloud, and Kubernetes logins, SSH keys, local configuration secrets, and crypto wallets. If a compromise is suspected, exposed credentials should be rotated immediately.<\/p>\n<h3>What does this incident mean for NIS2 obligations?<\/h3>\n<p>NIS2 requires verifiable due diligence in the supply chain. A supply chain incident like this extends beyond technical defense to include documentation and reporting obligations for affected companies.<\/p>\n<h3>Editor&#8217;s Reading Recommendations<\/h3>\n<ul style=\"line-height:1.8;\">\n<li><a href=\"https:\/\/www.securitytoday.de\/en\/2026\/06\/25\/from-when-the-reporting-deadline-clock-really-starts-ticking\/\">When the reporting deadline clock actually starts ticking<\/a><\/li>\n<li><a href=\"https:\/\/www.securitytoday.de\/en\/2026\/06\/24\/protective-dns-the-layer-that-many-overlook\/\">Protective DNS: The overlooked security layer<\/a><\/li>\n<li><a href=\"https:\/\/www.securitytoday.de\/en\/2026\/06\/20\/critical-roof-law-physical-resilience-ciso\/\">KRITIS Umbrella Act: When resilience becomes a CISO mandate<\/a><\/li>\n<\/ul>\n<div style=\"margin:40px 0 24px 0;\">\n<p style=\"margin:0 0 12px 0;font-size:0.78em;font-weight:700;text-transform:uppercase;letter-spacing:0.18em;color:#666;\">More from the MBF Media Network<\/p>\n<div style=\"padding:14px 18px;border-left:3px solid #0bb7fd;background:#fafafa;margin-bottom:6px;\">\n<div style=\"font-size:0.7em;font-weight:700;color:#0bb7fd;text-transform:uppercase;letter-spacing:0.12em;margin-bottom:4px;\">cloudmagazin<\/div>\n<p><a href=\"https:\/\/www.cloudmagazin.com\/2026\/06\/24\/ingress-nginx-eol-gateway-api-migration\/\" style=\"font-weight:600;line-height:1.4;color:#1a1a1a;text-decoration:none;\">Ingress-NGINX is deprecated: The path to the Gateway API<\/a><\/p>\n<\/div>\n<div style=\"padding:14px 18px;border-left:3px solid #202528;background:#fafafa;margin-bottom:6px;\">\n<div style=\"font-size:0.7em;font-weight:700;color:#202528;text-transform:uppercase;letter-spacing:0.12em;margin-bottom:4px;\">mybusinessfuture<\/div>\n<p><a href=\"https:\/\/mybusinessfuture.com\/schatten-ki-mittelstand-prozess-signal\/\" style=\"font-weight:600;line-height:1.4;color:#1a1a1a;text-decoration:none;\">Shadow AI in SMEs: What covert use reveals<\/a><\/p>\n<\/div>\n<div style=\"padding:14px 18px;border-left:3px solid #d65663;background:#fafafa;\">\n<div style=\"font-size:0.7em;font-weight:700;color:#d65663;text-transform:uppercase;letter-spacing:0.12em;margin-bottom:4px;\">digital-chiefs<\/div>\n<p><a href=\"https:\/\/www.digital-chiefs.de\/ki-generierter-code-haftung-governance-review-gates-cio\/\" style=\"font-weight:600;line-height:1.4;color:#1a1a1a;text-decoration:none;\">AI writes the code. Who\u2019s liable?<\/a><\/p>\n<\/div>\n<\/div>\n<p style=\"text-align:right;color:#868e96;font-size:0.85em;margin-top:48px;\"><em>Source header image: Pexels \/ Pachon in Motion (px:30547598)<\/em><\/p>\n<p style=\"text-align:right;color:#868e96;font-size:0.85em;margin-top:48px;\"><em>Image source: Pexels \/ Pachon in Motion (px:30547598)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"Mini Shai-Hulud spreads itself via npm and PyPI: How the supply-chain worm steals tokens and what security teams need to secure now.","protected":false},"author":50,"featured_media":18042,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Dune sandworm","_yoast_wpseo_title":"Mini Shai-Hulud: npm worm devours the supply chain","_yoast_wpseo_metadesc":"Discover how the Mini Shai-Hulud worm spreads via npm & PyPI, stealing tokens. Essential security steps for teams to safeguard now!","_yoast_wpseo_meta-robots-noindex":"","_yoast_wpseo_meta-robots-nofollow":"","_yoast_wpseo_meta-robots-adv":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-title":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_opengraph-image-id":0,"_yoast_wpseo_twitter-title":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_twitter-image-id":0,"_evm_translation_lang":"","featured_post":0,"featured_post_sortierung":0,"_wp_old_slug":[],"footnotes":""},"categories":[3],"tags":[],"class_list":["post-18046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aktuelles"],"evm_reading_time_minutes":7,"wpml_language":"en","wpml_translation_of":18041,"_links":{"self":[{"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/posts\/18046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/comments?post=18046"}],"version-history":[{"count":1,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/posts\/18046\/revisions"}],"predecessor-version":[{"id":18047,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/posts\/18046\/revisions\/18047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/media\/18042"}],"wp:attachment":[{"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/media?parent=18046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/categories?post=18046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.securitytoday.de\/en\/wp-json\/wp\/v2\/tags?post=18046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}