On 29 April 2026, four official npm packages from the SAP JavaScript and cloud application development ecosystem were compromised in a coordinated supply chain attack dubbed "mini Shai-Hulud". The poisoned releases - published between 09:55 and 12:14 UTC - embed a Bun-based credential stealer that harvests developer secrets, GitHub and npm tokens, GitHub Actions secrets, AWS / Azure / GCP / Kubernetes credentials and browser-stored passwords, then exfiltrates them to public repositories created on the victim's own GitHub account. The campaign - attributed by Wiz with high confidence to the TeamPCP operators behind the original Shai-Hulud, Checkmarx and Bitwarden compromises - also introduces a first-of-its-kind persistence vector that abuses AI coding agent configurations (Claude Code SessionStart hook and VS Code tasks.json folderOpen trigger) to re-execute on any developer workstation that opens an infected repository.
Affected Packages
4
Primary Attack Components
2
Attack Capabilities & TTPs
4
Operational Tradecraft
4
Hunting & Hardening Notes
2
Executive Summary
- Compromised Packages:
@cap-js/[email protected], @cap-js/[email protected], @cap-js/[email protected], [email protected] - all published on 29 April 2026 between 09:55 and 12:14 UTC.
- Bun-Based Credential Stealer: Malicious
preinstall hook in package.json downloads a platform-specific Bun runtime from GitHub Releases, then executes an 11.6 MB execution.js stealer + propagation framework.
- AI Agent Persistence (First-of-Its-Kind): The payload commits
.claude/settings.json abusing the Claude Code SessionStart hook and .vscode/tasks.json with "runOn": "folderOpen" into every accessible repo - opening an infected project in Claude Code or VS Code re-triggers the malware.
- Self-Propagation: Stolen GitHub / npm tokens are used to inject malicious GitHub Actions workflows and republish poisoned versions to the npm registry.
- Root Cause: Compromised maintainer account (
RoshniNaveenaS) plus a permissive npm OIDC trusted-publisher configuration that trusted any workflow on any branch in cap-js/cds-dbs, not only the canonical release-please.yml on main.
- Scope of Damage: 1100+ public GitHub repositories with the description "A Mini Shai-Hulud has Appeared" have been observed receiving exfiltrated, AES-256-GCM + RSA-4096 encrypted secrets.
Primary Attack Components
The compromised releases add a new preinstall script to package.json that runs setup.mjs, a runtime bootstrapper which downloads a platform-specific Bun ZIP from GitHub Releases, extracts it and immediately executes the Bun binary against execution.js. The payload harvests local developer credentials, GitHub and npm tokens, GitHub Actions secrets, cloud secrets from AWS / Azure / GCP / Kubernetes, and - new in this operation - passwords stored in Chrome, Safari, Edge, Brave and Chromium. Exfiltration is encrypted with AES-256-GCM and the symmetric key is wrapped with a TeamPCP-linked RSA-4096 public key, making the stolen data decryptable only by the attacker. Any workstation or CI/CD agent that ran npm install against the affected versions must be considered compromised.
Wiz Threat Intelligence Report - purge
node_modules + lock files, rotate every credential touched by an affected machine, audit cloud audit logs for unfamiliar API calls.
The payload commits itself into every accessible GitHub repository by writing two files: .claude/settings.json - abusing Claude Code's SessionStart hook to execute the stealer whenever a session is started in the repo - and .vscode/tasks.json - declaring a task with "runOn": "folderOpen" that automatically launches the malware as soon as the folder is opened in Microsoft Visual Studio Code. Per StepSecurity, this is one of the first supply chain attacks to deliberately target AI-agent configuration files as a persistence and propagation vector. Any developer who clones an infected repository and opens it in Claude Code or VS Code is silently re-infected, even if the original poisoned npm package has already been removed.
StepSecurity Advisory - grep all repos for
.claude/settings.json with a
SessionStart hook and for
.vscode/tasks.json entries with
"runOn":"folderOpen"; revert and force-push clean history.
Attack Capabilities & TTPs
After compromising maintainer RoshniNaveenaS's GitHub account, the attacker pushed a modified workflow to a non-main branch and used it to exchange a short-lived npm OIDC token, which was then printed in CI logs and used to publish the three @cap-js/* packages without provenance. The critical configuration gap: npm's OIDC trusted publisher for @cap-js/sqlite trusted any workflow in cap-js/cds-dbs with id-token: write permission and the environment: npm reference - not only the canonical release-please.yml on main. The mbt package is suspected to have been published using a stolen static npm token belonging to the cloudmtabot service account.
The 11.6 MB Bun-executed payload enumerates the standard credential locations for the four major cloud SDKs and Kubernetes, plus environment variables and runner secrets exposed inside GitHub Actions jobs. On infected build agents this gives the attacker a path from a single npm dependency to the customer's production cloud accounts - a classic supply chain blast-radius amplifier.
Aikido Security Analysis - rotate all cloud access keys, GitHub Actions secrets and kubeconfig tokens used on machines that resolved the affected versions.
The SAP operation introduces a browser password stealer that targets Chrome, Safari, Edge, Brave and Chromium-based browsers. According to Wiz, this capability is new for TeamPCP and was not seen in prior operations. Any saved password on an infected developer workstation - corporate SSO fallbacks, personal accounts, banking, social - must be considered exposed and reset.
BleepingComputer Coverage - force browser password reset and re-login on every infected workstation; review SSO sign-in logs.
Using stolen GitHub and npm tokens, the malware injects a malicious GitHub Actions workflow into the victim's repositories to siphon repository-level secrets, and republishes poisoned versions of the victim's own npm packages to the registry - turning every infected developer into a downstream distribution node and giving the campaign worm-like reach across the open-source ecosystem.
Snyk Threat Brief - audit GitHub Actions workflow history for unauthorized commits and revoke any PAT or OIDC token issued from those runs.
Operational Tradecraft
Stolen secrets are AES-256-GCM encrypted, the symmetric key wrapped under an embedded RSA-4096 public key, then pushed to a newly created public GitHub repository on the victim's own account with the description "A Mini Shai-Hulud has Appeared." In prior TeamPCP operations this was a fallback channel; in mini Shai-Hulud it is the primary C2 - and effectively impossible to block without breaking developer access to GitHub.
GitHub Search IOC - alert your developers to check their own GitHub accounts for any unexpected public repository matching this description and report it.