Trojanized Bitwarden CLI 2026.4.0 published to npm in TeamPCP-linked supply-chain attack

Bitwarden has confirmed that a malicious version of its command-line client, @bitwarden/cli 2026.4.0, was published to npm on April 22. It was available between 5:57 PM and 7:30 PM ET and was then removed. The company says only the npm distribution channel was affected, and it found no evidence that end-user vault data or production systems were accessed.

What happened

Bitwarden linked the incident to the earlier Checkmarx supply-chain compromise. A compromised Checkmarx-related development tool let attackers abuse the npm release path for a short period. StepSecurity’s analysis says an engineer’s GitHub account was used to push a branch and change the CLI publish workflow. The workflow then exchanged a GitHub Actions OIDC token for an npm publish token, so the malicious package went out through trusted publishing. Several research teams link the activity to TeamPCP, the group behind the earlier Trivy and LiteLLM compromises.

Technical details

  • A preinstall hook ran a loader, bw_setup.js, which downloads the Bun runtime if it is missing and then runs an obfuscated stealer, bw1.js.
  • The stealer targets npm and GitHub tokens, SSH keys, and AWS, Azure and Google Cloud credentials, with a focus on CI/CD environments.
  • Stolen data is encrypted with AES-256-GCM and exfiltrated by creating public GitHub repositories under the victim’s account. Researchers found these repositories contain the string “Shai-Hulud: The Third Coming”.
  • The malware uses stolen npm credentials to inject itself into other packages the victim can publish, which makes it a worm.
  • Warning signs: earlier CLI releases had no install scripts, and the package metadata still referenced 2026.3.0.

Who is affected

Developers and CI pipelines that installed or updated @bitwarden/cli from npm during the exposure window. Bitwarden released 2026.4.1, deprecated the malicious version and revoked the compromised access.

Recommendations

  • Search lockfiles, CI logs and developer machines for @bitwarden/[email protected]. If you find it, uninstall it, clear the npm cache and upgrade to 2026.4.1 or later.
  • Treat affected hosts as fully compromised. Rotate npm, GitHub, SSH and cloud credentials, starting with CI/CD secrets.
  • Look for unexpected public repositories or new branches under your GitHub accounts, and audit packages you maintain for unauthorised releases.
  • Run npm install with --ignore-scripts by default and allowlist only trusted lifecycle hooks.

Sources