• Home
  • About
  • Locations
  • Contact Us
logologologologo
  • Plan
    • AI Governance & Risk Management
    • Acquisition & VC
    • vCISO
    • Policies & Procedures
    • Strategy & Security Program Creation
    • Risk Management
  • Attack
    • Penetration Testing
    • AI Penetration Testing
    • Mobile Application Penetration Testing
    • Red Teaming
    • Web Application Penetration Testing
    • PTaaS
    • IOT Penetration Testing
  • Defend
    • Office 365 Security
    • HIPAA Compliance
    • PCI Compliance
    • Code Reviews
    • Blockchain Security Analysis
    • Vulnerability Assessments
  • Recover
    • Ransomware Recovery
    • Expert Witness
    • Forensics
  • Learn
    • Resources
    • Penetration Testing Training
    • Blog
  • Tools
    • Wp2shell Checker
    • php2shell checker
  • Instant Quote
✕

Shai Hulud Worm Steals Your npm, GitHub and AWS Secrets

May 16, 2026
Written By: author avatar James Knight
author avatar James Knight
James Knight is a well-known cybersecurity expert, international keynote speaker, and Senior Principal at Digital Warfare, a global cybersecurity consulting firm headquartered in McLean, Virginia, USA. Digital Warfare provides penetration testing, red teaming, vCISO, and many other services to enterprise organizations and government entities globally and across the United States. With over 25 years of hands-on experience at the intersection of offensive security and real-world threat intelligence, James has conducted pen tests, security assessments, vulnerability research, and adversarial analysis for corporate enterprises and government clients spanning financial services, critical infrastructure, and defense-adjacent sectors. His work covers the full spectrum of modern enterprise threats including advanced persistent threat campaigns, ransomware group tradecraft, supply chain compromise, AI-augmented attack techniques, and zero-day vulnerability exploitation. James is a recognized and frequently cited voice on cybersecurity in both specialist and mainstream media. Many well-known news sites, including The Daily Mail, have quoted him on many occasions: on ransomware payment policy in the context of the Colonial Pipeline attack, on how agentic AI is expected to reshape cyber warfare over the next 25 years, and on the security implications of the latest OpenAI security incident. His analysis has also been cited on Medium, where independent cybersecurity researchers have quoted his insights on supply chain security and AI-driven attack techniques. On supply chain risk, James has described the threat in terms that practitioners recognize immediately: supply chain attacks exploit the trust organizations place in third parties, requiring defenders to map every dependency like a battlefield and probe for weaknesses that could cascade across entire networks. On AI-driven attacks, his assessment reflects the same operational directness: AI-powered attacks exploit the enterprise fascination with new technology, requiring penetration testers to treat every unverified component as a potential payload delivery mechanism. His firm has been featured as a cybersecurity resource in FinancialContent and referenced across multiple professional data platforms including ZoomInfo and Datanyze as a specialist cybersecurity consulting firm serving Fortune 500 and SME organizations. At Digital Warfare, James leads the team and authors the Digital Warfare Threat Intelligence blog, publishing daily analysis of confirmed cybersecurity incidents sourced exclusively from verified primary sources including CISA advisories, vendor security bulletins, and leading threat intelligence publications. His analysis is built for security practitioners and business leaders who need actionable intelligence rather than vendor marketing. His original research includes the Digital Warfare 2026 Mid-Year Threat Pattern Report, an analysis of 28 confirmed threat incidents tracked between January and August 2026 that introduced three named security frameworks now used by enterprise security teams. The Zero-Day Priority Framework establishes a tiered patching classification system grounded in confirmed 2026 exploitation data showing that 73 percent of zero-days are weaponized within 72 hours of public disclosure. The Supply Chain Attack Taxonomy defines three distinct classes of supply chain compromise, each requiring different defensive controls and monitoring approaches. The AI Augmentation Classification documents three confirmed maturity levels of AI-assisted attack capability observed in real-world 2026 incidents, from AI-generated custom malware at Level One through fully autonomous ransomware operations at Level Three. Digital Warfare was founded in 2012 and serves corporations and governmental entities seeking rigorous security assessment and strategic security leadership from practitioners with genuine operational experience. Every member of the firm’s elite team brings over 25 years of cybersecurity experience to every client engagement. Connect with James on LinkedIn or follow his threat intelligence updates at digitalwarfare.com/blog.
See Full Bio

The Shai Hulud worm is a self replicating supply chain attack that steals npm tokens, GitHub credentials, AWS keys and Kubernetes secrets from developer machines and CI/CD pipelines. It spreads by republishing infected versions of trusted npm and PyPI packages. Researchers count more than 170 affected packages with over 518 million cumulative downloads.

What Is the Shai Hulud Worm?

Instead of phishing a company or delivering ransomware, the attackers poison software that developers already trust and install automatically. That makes this campaign one of the most dangerous supply chain attacks of 2026, because the attack surface is no longer just endpoints and firewalls. It now includes CI/CD pipelines, GitHub Actions, npm registries, package maintainers, cloud identities and developer workstations.

Researchers from Aikido Security, Endor Labs, Socket, SafeDep, Snyk and Microsoft investigated the campaign after finding malicious package versions that harvest secrets from developer systems. We have tracked the same pattern in other incidents, including the Red Hat supply chain compromise of npm packages and the Databricks TeamPCP attack on CI/CD pipelines.

Which Packages and Companies Were Affected?

Reports link the campaign to packages connected to the following projects and ecosystems:

  • TanStack
  • Mistral AI
  • OpenSearch
  • Guardrails AI
  • UiPath
  • Other npm ecosystems and PyPI repositories
  • CI/CD environments that installed the affected versions

Researchers estimate more than 170 packages and over 518 million cumulative downloads, so the exposure reaches well beyond the named projects.

How Does the Worm Steal Secrets and Spread?

The malware uses a multi stage design built for developer environments. Obfuscated JavaScript payloads first profile the system they run on, then collect secrets and send them out. The targets include environment variables, .npmrc files, GitHub Actions secrets, AWS credentials, Kubernetes configurations, CI/CD runners, cloud deployment tokens and local developer secrets.

A realistic attack chain looks like this:

  1. Attackers compromise a maintainer’s credentials
  2. Malicious npm package versions are published
  3. Developers and pipelines install them automatically
  4. Install scripts run and harvest credentials
  5. Cloud tokens are collected and GitHub OIDC access is abused
  6. The CI/CD environment is compromised and attackers move laterally
  7. The worm enumerates other packages the maintainer can publish, injects its payload and republishes them with a higher version number

Hidden install scripts, detached background processes, silent execution and error suppression help it stay quiet. Microsoft researchers also found geofenced destructive logic that can run damaging commands under certain regional conditions.

Why Does Signed Provenance Not Mean a Package Is Safe?

This is the most alarming finding. The attackers hijacked GitHub Actions publishing workflows and abused OpenID Connect (OIDC) authentication, so the malicious versions were published through legitimate infrastructure with valid provenance signatures. Many teams treat a signed package as a safe one. This campaign shows that provenance proves where a package was built, not that the build was trustworthy.

What Secrets Does the Malware Target?

  • npm publishing credentials and tokens
  • GitHub personal access tokens and CI/CD tokens
  • AWS secrets and Azure cloud tokens
  • Kubernetes credentials
  • Docker registry access
  • SSH keys and API secrets

Investigators also saw functionality aimed at cryptocurrency wallets, AI tooling and messaging applications.

Who Is at Risk From the Shai Hulud Worm?

Enterprises depend heavily on npm and cloud native pipelines. A single compromise can expose source code repositories, production cloud infrastructure, customer data, Kubernetes clusters, AI environments and enterprise authentication systems.

Small and mid sized businesses often lack mature DevSecOps, supply chain monitoring, software composition analysis and dedicated threat hunting, so the same attack can land harder with less warning.

Cloud environments are exposed because stolen tokens can lead to AWS account compromise, Kubernetes takeover, container compromise and lateral movement. Recovery is disruptive, with emergency credential rotation, CI/CD shutdowns, software rebuilds and possible outages. Supply chain incidents can also create compliance exposure under SOC 2, ISO 27001, GDPR, HIPAA, PCI DSS and NIST frameworks.

How Do You Detect Shai Hulud Worm Activity?

Start with visibility into what your builds and developer machines actually install.

  • Dependency monitoring: watch for unexpected package updates, suspicious versions, unauthorized dependency changes, hidden install scripts and integrity check failures
  • EDR: alert on unauthorized command execution, environment variable access, token harvesting and unusual npm execution
  • SIEM: build detections for GitHub token misuse, OIDC anomalies, suspicious package publishing, Kubernetes secret access and cloud credential abuse
  • Threat hunting: search for obfuscated JavaScript payloads, suspicious install scripts, unauthorized GitHub Actions usage and secret exfiltration attempts
  • Identity monitoring: look for privilege escalation, session hijacking, MFA bypass attempts and abnormal GitHub authentication

How Do You Mitigate the Shai Hulud Worm?

  1. Remove compromised packages immediately
  2. Rotate every exposed credential
  3. Audit your full dependency tree
  4. Restrict GitHub Actions permissions and limit OIDC token scope
  5. Enforce MFA everywhere
  6. Restrict who can publish packages and audit npm maintainers
  7. Use private package registries and validate provenance carefully
  8. Harden Kubernetes, segment development infrastructure and tighten cloud identity controls
  9. Deploy software composition analysis and monitor developer endpoints
  10. Run incident response exercises for a supply chain scenario

Newer package manager protections help as well. See how pnpm 11 blocks risky new package installs and how the GitHub data breach showed the same supply chain risk.

What Should Security Teams Take From This Attack?

Zero Trust has to apply to software development itself. Dependencies, signed packages, automated workflows, provenance attestations and open source ecosystems all need continuous validation, because attackers now go after the delivery pipeline instead of the endpoint.

The fastest way to learn whether your pipeline is exposed is to test it from the attacker’s side. Our team runs penetration testing and vulnerability assessments, and our PTaaS platform keeps that testing continuous between audits.

Key Takeaways

  • The Shai Hulud worm steals npm, GitHub, AWS and Kubernetes secrets and spreads by republishing infected packages.
  • Researchers count more than 170 affected packages and over 518 million cumulative downloads.
  • Valid provenance signatures were obtained through hijacked GitHub OIDC tokens, so a signed package is not automatically safe.
  • Rotate credentials, limit OIDC scope, enforce MFA and restrict publishing rights.
  • Test your CI/CD pipeline the way an attacker would.

Frequently Asked Questions About the Shai Hulud Worm

What is the Shai Hulud worm?

It is a self replicating supply chain malware campaign that spreads through malicious npm and PyPI package versions. It steals npm tokens, GitHub credentials, AWS keys, Kubernetes secrets and other credentials from developer machines and CI/CD pipelines.

How does the Shai Hulud worm spread?

After stealing a maintainer’s credentials, it finds other packages that person can publish, injects its payload, raises the version number and republishes them. Each new infection steals more credentials and repeats the cycle.

Does a signed package mean it is safe from the Shai Hulud worm?

No. Researchers found that attackers hijacked GitHub OIDC tokens and published malicious versions through legitimate GitHub Actions workflows, so the packages carried valid provenance signatures.

What should I do if I installed an affected package?

Remove the package, rotate every credential the machine or pipeline could reach, including npm, GitHub, AWS and Kubernetes secrets, then review recent publishing and cloud activity for anything you did not authorize.

How can I reduce the risk of npm supply chain attacks?

Limit GitHub Actions and OIDC token scope, enforce MFA, audit dependency trees, restrict who can publish packages, use a private registry, and test your build pipeline the way an attacker would.

author avatar
James Knight Senior Principal, and lead threat intelligence analyst
James Knight is a well-known cybersecurity expert, international keynote speaker, and Senior Principal at Digital Warfare, a global cybersecurity consulting firm headquartered in McLean, Virginia, USA. Digital Warfare provides penetration testing, red teaming, vCISO, and many other services to enterprise organizations and government entities globally and across the United States. With over 25 years of hands-on experience at the intersection of offensive security and real-world threat intelligence, James has conducted pen tests, security assessments, vulnerability research, and adversarial analysis for corporate enterprises and government clients spanning financial services, critical infrastructure, and defense-adjacent sectors. His work covers the full spectrum of modern enterprise threats including advanced persistent threat campaigns, ransomware group tradecraft, supply chain compromise, AI-augmented attack techniques, and zero-day vulnerability exploitation. James is a recognized and frequently cited voice on cybersecurity in both specialist and mainstream media. Many well-known news sites, including The Daily Mail, have quoted him on many occasions: on ransomware payment policy in the context of the Colonial Pipeline attack, on how agentic AI is expected to reshape cyber warfare over the next 25 years, and on the security implications of the latest OpenAI security incident. His analysis has also been cited on Medium, where independent cybersecurity researchers have quoted his insights on supply chain security and AI-driven attack techniques. On supply chain risk, James has described the threat in terms that practitioners recognize immediately: supply chain attacks exploit the trust organizations place in third parties, requiring defenders to map every dependency like a battlefield and probe for weaknesses that could cascade across entire networks. On AI-driven attacks, his assessment reflects the same operational directness: AI-powered attacks exploit the enterprise fascination with new technology, requiring penetration testers to treat every unverified component as a potential payload delivery mechanism. His firm has been featured as a cybersecurity resource in FinancialContent and referenced across multiple professional data platforms including ZoomInfo and Datanyze as a specialist cybersecurity consulting firm serving Fortune 500 and SME organizations. At Digital Warfare, James leads the team and authors the Digital Warfare Threat Intelligence blog, publishing daily analysis of confirmed cybersecurity incidents sourced exclusively from verified primary sources including CISA advisories, vendor security bulletins, and leading threat intelligence publications. His analysis is built for security practitioners and business leaders who need actionable intelligence rather than vendor marketing. His original research includes the Digital Warfare 2026 Mid-Year Threat Pattern Report, an analysis of 28 confirmed threat incidents tracked between January and August 2026 that introduced three named security frameworks now used by enterprise security teams. The Zero-Day Priority Framework establishes a tiered patching classification system grounded in confirmed 2026 exploitation data showing that 73 percent of zero-days are weaponized within 72 hours of public disclosure. The Supply Chain Attack Taxonomy defines three distinct classes of supply chain compromise, each requiring different defensive controls and monitoring approaches. The AI Augmentation Classification documents three confirmed maturity levels of AI-assisted attack capability observed in real-world 2026 incidents, from AI-generated custom malware at Level One through fully autonomous ransomware operations at Level Three. Digital Warfare was founded in 2012 and serves corporations and governmental entities seeking rigorous security assessment and strategic security leadership from practitioners with genuine operational experience. Every member of the firm's elite team brings over 25 years of cybersecurity experience to every client engagement. Connect with James on LinkedIn or follow his threat intelligence updates at digitalwarfare.com/blog.
See Full Bio
Penetration Testing Ransomware Incident Response Threat Intelligence Zero-Day Vulnerability Research
social network icon social network icon
Share
Copyright © Digital Warfare. All rights reserved.
  • Home
  • About
  • Locations
  • Contact Us