On 24 November 2025 a second wave of the Shai-Hulud worm published malicious versions of hundreds of npm packages, including PostHog's SDKs, that ran a preinstall script to install the Bun runtime and steal GitHub, npm and AWS, Google Cloud and Azure credentials. Stolen data went to public GitHub repositories described as "Sha1-Hulud: The Second Coming", and stolen npm tokens were used to infect more packages. Anyone who installed an affected version that day should rotate every credential on that machine or runner and check for a rogue self-hosted runner.
| Disclosed | November 24, 2025 |
|---|---|
| Earliest known activity | November 18, 2025 |
| Affected | npm, GitHub, posthog-node, posthog-js, PostHog |
| Type | Supply chain |
| Status | Contained |
What was exposed
Environment variables, local credential files such as Google Cloud application default credentials, cloud instance-metadata credentials, secrets read from AWS, Google Cloud and Azure secret stores, GitHub and npm tokens, and anything TruffleHog found on disk. Because the hook ran at preinstall, it executed even if the install later failed. Data was published to public GitHub repositories with 18-character random names. The malware also registered the machine as a GitHub self-hosted runner named SHA1HULUD, giving the attacker a remote command channel, and Datadog reports it tried to delete files in the home directory when it found no tokens to use.
Am I affected?
You are affected if a developer machine or CI runner installed a compromised version on or after 24 November 2025. PostHog's affected versions are posthog-node 4.18.1, 5.13.3 and 5.11.3, posthog-js 1.297.3, posthog-react-native 4.11.1, posthog-docusaurus 2.0.6, posthog-react-native-session-replay 1.2.2, @posthog/agent 1.24.1, @posthog/ai 7.1.2 and @posthog/cli 0.5.15; the PostHog script tag was not affected. For other packages, compare your lockfiles with Datadog's consolidated indicator list. On disk, look for setup_bun.js, bun_environment.js, truffleSecrets.json or a ~/.dev-env directory, and in GitHub look for a runner named SHA1HULUD or repositories with the description "Sha1-Hulud: The Second Coming".
What to do now
- Compare lockfiles and caches with the published indicator lists, delete
node_modules, clear npm, yarn and pnpm caches, and reinstall versions published after the attack was contained. - Rotate GitHub tokens, npm tokens and cloud credentials on every affected machine and runner, and rotate secrets stored in AWS Secrets Manager, Google Secret Manager and Azure Key Vault that those credentials could read.
- Remove any self-hosted runner named
SHA1HULUD, delete the~/.dev-envdirectory, and review workflows that run on discussion events. - Delete any exfiltration repositories in your GitHub accounts and organizations, after saving what they reveal about which secrets leaked.
- Disable install scripts by default (pnpm 10 does) and set a minimum release age for new versions, as PostHog did after the incident.
Keys to rotate
Guides to the credentials this incident put at risk:
- Rotate GitHub keys
- Rotate npm keys
- Rotate AWS (IAM access keys) keys
- Rotate Google Cloud (service account keys and API keys) keys
- Rotate Azure (Microsoft Entra app client secrets) keys
Timeline
- An external pull request to a PostHog repository abuses a
pull_request_targetworkflow to send a bot's GitHub token to an attacker-controlled webhook, according to PostHog. Source - PostHog says the attacker used that token to push a workflow change that dumped the repository's secrets, including the npm publishing token. Source
- Malicious PostHog versions are published from 04:11 UTC. PostHog deletes them, revokes publishing tokens and starts rotating credentials by 09:30 UTC. Source
- Datadog counts 796 unique packages and 1,092 versions affected, with the last affected package published at about 18:00 UTC, and more than 14,000 exfiltration repositories. Source
Indicators
From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.
- Files
setup_bun.jsandbun_environment.jswith a newpreinstallscript inpackage.json. - GitHub repositories described as "Sha1-Hulud: The Second Coming" with 18-character lowercase alphanumeric names.
- A self-hosted GitHub Actions runner named
SHA1HULUDinstalled under~/.dev-env. - A local file named
truffleSecrets.json.
Frequently asked questions
Am I affected by the npm incident?
You are affected if a developer machine or CI runner installed a compromised version on or after 24 November 2025. PostHog's affected versions are posthog-node 4.18.1, 5.13.3 and 5.11.3, posthog-js 1.297.3, posthog-react-native 4.11.1, posthog-docusaurus 2.0.6, posthog-react-native-session-replay 1.2.2, @posthog/agent 1.24.1, @posthog/ai 7.1.2 and @posthog/cli 0.5.15; the PostHog script tag was not affected. For other packages, compare your lockfiles with Datadog's consolidated indicator list. On disk, look for setup_bun.js, bun_environment.js, truffleSecrets.json or a ~/.dev-env directory, and in GitHub look for a runner named SHA1HULUD or repositories with the description "Sha1-Hulud: The Second Coming".
What was exposed in the npm incident?
Environment variables, local credential files such as Google Cloud application default credentials, cloud instance-metadata credentials, secrets read from AWS, Google Cloud and Azure secret stores, GitHub and npm tokens, and anything TruffleHog found on disk. Because the hook ran at preinstall, it executed even if the install later failed. Data was published to public GitHub repositories with 18-character random names. The malware also registered the machine as a GitHub self-hosted runner named SHA1HULUD, giving the attacker a remote command channel, and Datadog reports it tried to delete files in the home directory when it found no tokens to use.
Which keys should I rotate?
Rotate any GitHub, npm, AWS (IAM access keys), Google Cloud (service account keys and API keys), Azure (Microsoft Entra app client secrets) credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.
Other supply-chain compromises
- LiteLLM 1.107.0 on PyPI and Docker carried a credential stealer after a leaked master key 2026-10-21
- tensorlake 0.5.144 on npm shipped a Shai-Hulud variant with a wipe-on-revoke dead-man's switch 2026-10-08
- keyv, flat-cache and cache-manager npm releases carried a CI-secret stealer with a revocation trap 2026-08-04
- 32 @redhat-cloud-services npm packages compromised after a VS Code extension hijacked a GitHub account 2026-06-01
- 14 typosquatted OpenSearch and DevOps npm packages stole AWS, Vault, GitHub Actions and npm secrets 2026-05-28
- Nx Console 18.95.0 VS Code extension shipped a credential stealer after a TanStack infection 2026-05-18