Skip to navigation

Threat reportSupply ChainTL-2026-4090

Credential Layer Exposure: Secrets Sprawl and Shai-Hulud npm Supply Chain Credential Harvesting (GitGuardian)

mediumMONITORING

GitGuardian reports 28.65 million new secrets exposed on public GitHub in 2025 (+34% YoY), with about 28% of secret incidents occurring outside code repositories and developer laptops holding roughly 150 secrets each. The Shai-Hulud npm worm waves (September and November 2025) turned developer and CI environments into credential-harvesting points. First disclosed .

Key facts

IdentifiersTL-2026-4090
Also known asShai-Hulud, Shai-Hulud 2.0, Sha1-Hulud: The Second Coming, Secrets Sprawl, Credential Layer Exposure
SeverityMEDIUM
First disclosed
Affected productsnpm (OpenJS/GitHub) npm packages compromised by the Shai-Hulud worm (e.g. tinycolor, ENS Domains, Zapier, PostHog and Voiceflow packages); GitHub GitHub repositories, Actions workflows and self-hosted runners abused for exfiltration and persistence
Weaknesses (CWE)CWE-522, CWE-798, CWE-506, CWE-829
MalwareShai-Hulud, Shai-Hulud 2.0
ToolsBun, TruffleHog - S9009
MITRE ATT&CK techniquesT1020 Automated Exfiltration, T1027 Obfuscated Files or Information, T1059.004 Command and Scripting Interpreter, T1059.007 JavaScript, T1078.004 Cloud Accounts, T1105 Ingress Tool Transfer, T1119 Automated Collection, T1195.002 Compromise Software Supply Chain, T1485 Data Destruction, T1528 Steal Application Access Token, T1552.001 Credentials In Files, T1552.004 Unsecured Credentials and 4 more in the attack flow
MotivationFINANCIAL
Target sectorstechnology, software-development, finance, cryptocurrency
Target regionsGlobal
Detection rules9 (1 shown free)
Sources10 cited sources

Detection coverage

As of 2026-10-23, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-4090 across Splunk SPL, Microsoft KQL and Sigma, covering 38 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Shai-Hulud 2.0 setup_bun.js Preinstall Loader and bun_environment.js Execution

Detects the Shai-Hulud 2.0 (Sha1-Hulud: The Second Coming) execution chain: an npm preinstall hook running setup_bun.js to install the Bun runtime, then Bun executing the bun_environment.js payload that harvests credentials with TruffleHog. Bun runs outside many detection paths, so process-level visibility on developer and CI hosts is the control point.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1195.002, T1059.007
  • Data sources: sysmon, microsoft_defender_for_endpoint, linux_auditd_process_execution
  • Severity: high
  • Confidence: high

Splunk SPL

index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 (CommandLine="*setup_bun.js*" OR CommandLine="*bun_environment.js*" OR (ParentCommandLine="*setup_bun.js*" AND (Image="*bun.exe" OR Image="*/bun")))
```Shai-Hulud 2.0 loader chain: npm preinstall -> setup_bun.js -> bun -> bun_environment.js```
| eval indicator=case(like(CommandLine,"%bun_environment.js%"),"bun_environment.js payload execution",like(CommandLine,"%setup_bun.js%"),"setup_bun.js preinstall loader",true(),"Bun runtime spawned by setup_bun.js")
| stats count min(_time) as first_seen max(_time) as last_seen values(indicator) as indicators values(Image) as images values(CommandLine) as command_lines values(ParentImage) as parent_images by host, user
| convert ctime(first_seen) ctime(last_seen)

Microsoft KQL

DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine contains "setup_bun.js"
    or ProcessCommandLine contains "bun_environment.js"
    or (InitiatingProcessCommandLine contains "setup_bun.js" and FileName in~ ("bun", "bun.exe"))
| extend Indicator = case(
    ProcessCommandLine contains "bun_environment.js", "bun_environment.js payload execution",
    ProcessCommandLine contains "setup_bun.js", "setup_bun.js preinstall loader",
    "Bun runtime spawned by setup_bun.js")
| project Timestamp, DeviceName, AccountName, Indicator, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256
| order by Timestamp desc

Sigma

title: Shai-Hulud 2.0 setup_bun.js Loader and bun_environment.js Execution
id: 7d1c4a52-3b0e-4f6a-9c1d-5e2a8b7f1001
status: experimental
description: 'Detects the Shai-Hulud 2.0 chain: npm preinstall running setup_bun.js, Bun spawned by it, and execution of the bun_environment.js payload.'
references:
    - https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem
    - https://blog.checkpoint.com/research/shai-hulud-2-0-inside-the-second-coming-the-most-aggressive-npm-supply-chain-attack-of-2025/
    - https://blackpointcyber.com/blog/inside-the-shai-hulud-npm-supply-chain-attack/
    - https://blog.gitguardian.com/credential-layer-security/
author: Threadlinqs Team
date: 2026/10/22
tags:
    - attack.initial_access
    - attack.t1195.002
    - attack.execution
    - attack.t1059.007
    - tl.TL-2026-4090
logsource:
    category: process_creation
detection:
    selection_cmd:
        CommandLine|contains:
            - 'setup_bun.js'
            - 'bun_environment.js'
    selection_bun_child:
        ParentCommandLine|contains: 'setup_bun.js'
        Image|endswith:
            - '/bun'
            - '\bun.exe'
    condition: 1 of selection_*
falsepositives:
    - Developers who name their own Bun bootstrap script setup_bun.js
    - Security researchers detonating Shai-Hulud samples in a lab
level: high

Known false positives:

  • Developers legitimately adopting Bun who name their own bootstrap script setup_bun.js
  • Security researchers detonating Shai-Hulud samples in a lab

Tuning notes: Match is on exact IOC filenames so it is low-noise. Allow-list internal repositories that ship their own setup_bun.js by excluding their parent command line or working directory. On Linux CI runners ingest Sysmon for Linux or auditd execve into the same index. The Sigma rule omits product so it applies to Windows and Linux process_creation sources.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • Shai-Hulud Wave 1 [indicator] Payload (Known SHA256 or node [indicator] From npm Lifecycle) · unlock with TL Creds
  • Cloud Metadata and Secret Manager Access by Node or Bun on Build Hosts (Shai-Hulud 2.0) · unlock with TL Creds
  • GitHub Dead-Drop Repository Creation (Shai-Hulud and Sha1-Hulud: The Second Coming) · unlock with TL Creds
  • Bun Runtime Installer Launched From a Node or npm Install Hook (Shai-Hulud 2.0 Loader) · unlock with TL Creds
  • GitHub Self-Hosted Runner Registration From Script Context (Shai-Hulud 2.0 SHA1HULUD Persistence) · unlock with TL Creds
  • Script-Runtime-Spawned Home Directory Wipe (Shai-Hulud 2.0 Destructive Failsafe) · unlock with TL Creds
  • TruffleHog Filesystem Credential Sweep on Developer and CI Hosts (Shai-Hulud) · unlock with TL Creds
  • [indicator] Exfiltration Endpoint Contact From Developer and Build Hosts (Shai-Hulud Wave 1) · unlock with TL Creds

Indicators of compromise

As of 2026-10-23, Threadlinqs Intelligence tracks 38 indicators of compromise for TL-2026-4090.

Sample indicators (3 of 38)

  • Domain: webhook[.]site
  • URL: hxxps://github[.]com/actions/runner/releases/download/v2.330.0/
  • File hash: de0e25a3e6c1e1e5998b306b7141b3dc4c0088da9d7bb47c1c00c91e6e4f85d6

Defanged, TLP:CLEAR. Full set of 38 indicators: unlock with TL Creds.

38 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

GitGuardian's analysis of Shai-Hulud 2.0 found 33,185 unique secrets across 294,842 occurrences, with 3,760 confirmed valid.

This record documents the credential-layer exposure picture from GitGuardian's 2026 reporting (blog post of 2026-10-21, 'What Is Credential Layer Security?') and the Shai-Hulud supply chain worm it cites as its main case study. The blog is a vendor thought-leadership piece, not a primary DFIR report. It states no CVEs, no threat-actor attribution and no IOCs. The technical detail below comes from primary and secondary reporting on the Shai-Hulud campaigns.

Secrets sprawl statistics (GitGuardian, State of Secrets Sprawl 2026): 28.65 million new secrets were exposed on public GitHub during 2025 (+34% year over year). About 28% of secret incidents occurred outside code repositories. Developer laptops hold about 150 secrets each on average. The blog also cites 24,008 unique secrets in publicly exposed MCP (Model Context Protocol) configuration files, 2,117 of them valid, and an 81% year-over-year rise in AI-service credentials.

Shai-Hulud wave 1 (identified 2025-09-14/15): a self-replicating worm hidden in trojanized npm packages. Over 180 packages were initially reported (including tinycolor), later over 500 per CISA. Malicious code ran bundle.js, which downloaded and ran the legitimate TruffleHog scanner to find GitHub PATs, npm tokens and AWS/GCP/Azure keys. Findings were exfiltrated to a webhook.site endpoint and published to public repositories named 'Shai-Hulud' created through the GitHub /user/repos API. The worm injected the workflow .github/workflows/shai-hulud-workflow.yml and used stolen npm tokens to republish further packages with injected code. CISA published alert guidance on 2025-09-23 recommending dependency review, pinning to versions produced before 2025-09-16, credential rotation, phishing-resistant MFA, and blocking webhook.site.

Shai-Hulud 2.0 'The Second Coming' (prepared from 2025-11-21, launched 2025-11-24): the payload moved to the npm preinstall step using setup_bun.js, which installs the Bun runtime, and bun_environment.js, which holds the core logic. Bun runs outside many detection paths. TruffleHog ran from /home/runner/.truffler-cache/trufflehog with a filesystem sweep of /home/runner. Cloud metadata endpoints and cloud secret managers (AWS, GCP, Azure) were queried with stolen tokens. Instead of a public endpoint, exfiltration used GitHub repositories created with victim credentials. These carried the description 'Sha1-Hulud: The Second Coming' and randomly generated 18-character names. They held cloud.json, environment.json and actionsSecrets.json. Persistence came from registering infected hosts as self-hosted GitHub runners (a discussion-triggered backdoor workflow) and from injecting rogue workflows that serialize repository secrets into CI artifacts, then deleting them. Check Point reports a destructive failsafe that wipes local files when containment is detected. Reported scale is 754 packages (1,700 versions) per GitGuardian, 621 per Check Point, and about 25,000 repositories. GitGuardian's headline analysis found 14,206 secrets across 487 organizations (2,485 still valid), and its broader post-processed dataset has 33,185 unique secrets across 294,842 occurrences, with 3,760 valid (about 11%). GitHub credentials dominated the valid secrets: 581 PATs, 386 OAuth tokens, 104 fine-grained PATs and 101 GitLab tokens. GitGuardian notes the true valid count at leak time was likely higher because many credentials were rotated before validation.

Note on the PyPI claim: the hunt summary and blog tie Shai-Hulud to npm/PyPI. The sourced Shai-Hulud 2.0 figures (754 packages, 20,649 repositories) are npm-based. GitGuardian's separate PyPI research (3,938 unique secrets, 768 valid) is a distinct, earlier study of secrets leaked in PyPI packages and not part of the Shai-Hulud worm.

Defensive takeaway: treat developer endpoints, CI runners, AI-tool/MCP configuration and package install hooks as one credential layer. Prefer short-lived, scoped credentials, disable install scripts where possible, pin dependencies, and monitor GitHub for unexpected repository creation, self-hosted runner registration and new workflows. Severity and status are analyst-assigned, not source-stated.

MITRE ATT&CK techniques by tactic:

Exfiltration

T1020 Automated Exfiltration; T1567 Exfiltration Over Web Service

Defense Evasion

T1027 Obfuscated Files or Information

Execution

T1059.004 Command and Scripting Interpreter; T1059.007 JavaScript

Persistence

T1078.004 Cloud Accounts

Command and Control

T1105 Ingress Tool Transfer

Collection

T1119 Automated Collection

Initial Access

T1195.002 Compromise Software Supply Chain; T1566.002 Phishing

Impact

T1485 Data Destruction

Credential Access

T1528 Steal Application Access Token; T1552.001 Credentials In Files; T1552.004 Unsecured Credentials; T1552.005 Cloud Instance Metadata API; T1555.006 Credentials from Password Stores

Remediation

Immediate actions

  • Rotate all developer, CI/CD, GitHub, npm and cloud credentials that were present on any host that installed affected packages
  • Search GitHub organizations for repositories named 'Shai-Hulud' or described 'Sha1-Hulud: The Second Coming', for unexpected self-hosted runners, and for unrecognized workflows such as shai-hulud-workflow.yml
  • Block outbound connections to webhook.site and review firewall/proxy logs for it
  • Audit package-lock.json and yarn.lock, including nested dependencies, for compromised package versions

Workarounds

  • Pin npm dependencies to releases produced before 2025-09-16 for wave 1, per CISA
  • Remove unneeded GitHub Apps and OAuth applications and audit repository webhooks and secrets

Longer-term hardening

  • Enforce phishing-resistant MFA on GitHub and npm accounts
  • Prefer short-lived, scoped credentials and workload identity over static secrets in CI
  • Run secret scanning on developer endpoints, CI logs, collaboration tools and MCP/AI-agent configuration files, not only on code repositories
  • Disable npm lifecycle scripts (ignore-scripts) in CI where feasible and use dependency cooldown or pinning policies
  • Enable branch protection, GitHub secret scanning and Dependabot security updates

Affected and fixed versions

  • npm (OpenJS/GitHub) — npm packages compromised by the Shai-Hulud worm (e.g. tinycolor, ENS Domains, Zapier, PostHog and Voiceflow packages)
    Vulnerable versions: Compromised package versions published during 2025-09 and 2025-11 waves
    Fixed in: Versions published before 2025-09-16 (wave 1 per CISA); consult vendor advisories for wave 2
  • GitHub — GitHub repositories, Actions workflows and self-hosted runners abused for exfiltration and persistence
    Vulnerable versions: Environments with exposed PATs/OAuth tokens
    Fixed in: Rotate credentials and audit runners/workflows

Timeline

Last updated · revalidated 1× · latest source

  • Shai-Hulud, a self-replicating npm worm, is identified; over 180 packages (including tinycolor) are initially reported compromised
  • Original Shai-Hulud wave: npm packages compromised on or before this date (CISA advises pinning to versions published before 2025-09-16)
  • Blackpoint Cyber and others publish technical analysis: locked-ioc-29 runs TruffleHog, exfiltrates to locked-ioc-26 and injects shai-hulud-workflow.yml; over 700 'Shai-Hulud' repositories created under victim accounts
  • CISA publishes an alert on the npm compromise (over 500 packages), recommending dependency review, credential rotation, phishing-resistant MFA and blocking locked-ioc-26
  • Preparation of the second wave begins, per GitGuardian
  • Last Shai-Hulud 2.0 affected package published around 18:00 UTC; npm likely implemented preventive measures (Datadog)
  • Shai-Hulud 2.0 ('The Second Coming') launches using preinstall locked-ioc-27 and locked-ioc-20, with GitHub repositories as dead-drops; security vendors publish alerts the same day
  • Unit 42 updates its report with Shai-Hulud 2.0 details: over 25,000 malicious repositories across about 350 unique users
  • 754 unique npm packages (1,700 versions) are reported infected; GitGuardian publishes analysis of exposed secrets
  • PostHog publishes an incident postmortem on its Shai-Hulud 2.0 compromise (per Datadog)
  • GitGuardian publishes 'What Is Credential Layer Security?' citing 28.65M secrets exposed on public GitHub in 2025 and the Shai-Hulud 2.0 data (33,185 unique secrets, 294,842 occurrences, 3,760 valid)

Update history

Sources cited

Previous and next in supply chain

Further reading

Drafted by the Threadlinqs research pipeline from 10 sources; published ; last updated .

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats