Malicious Bitwarden CLI npm Release Targets Developer Credentials and GitHub Actions

· Original article ↗

Summary

StepSecurity reports that attackers used a compromised Bitwarden engineer account to publish a malicious @bitwarden/[email protected] release, whose Bun-staged payload targets developer credentials, AI-tool configs and GitHub Actions secrets.

Key points

  • StepSecurity reports that an attacker compromised a Bitwarden engineer’s GitHub account, altered the publishing workflow, and used OIDC to obtain an npm token and publish a staged tarball.
  • The @bitwarden/[email protected] package added a preinstall hook that downloads Bun and launches a 9.7 MB obfuscated credential stealer.
  • The payload targets SSH keys, npm and GitHub tokens, AWS and GCP credentials, shell history, environment variables, and AI-tool configuration files, including Claude Code and MCP settings.
  • StepSecurity says the payload encrypts stolen data and sends it to audit[.]checkmarx[.]cx, with GitHub-based fallback channels also described.
  • The malware can use discovered GitHub tokens to enumerate accessible repositories and Actions secrets, then inject workflows and retrieve prior workflow artifacts.
  • In a controlled test, StepSecurity reports that Harden Runner blocked the primary outbound connection; its remediation guidance includes rotating exposed credentials and auditing accessible repositories and workflows.

Article Details

Attack Vectors
  • An attacker who compromised a Bitwarden engineer's GitHub account altered the repository's publish workflow and used GitHub Actions OIDC Trusted Publishing to publish a staged malicious @bitwarden/[email protected] package to npm.
  • The package's preinstall hook downloaded the Bun runtime and silently executed an obfuscated credential-stealing payload.
  • The payload collected developer and CI/CD credentials, including SSH keys, npm and GitHub tokens, AWS and GCP credentials, shell history, environment variables, and AI-tool configuration data.
  • The malware exfiltrated encrypted data to a primary C2 endpoint and described GitHub-based fallback channels, including creating repositories to store encrypted results.
  • Using stolen GitHub tokens, the malware enumerated accessible repositories and Actions secrets, then created branches and injected malicious workflow files.
Defensive Notes
  • Remove @bitwarden/[email protected], install the reported safe version 2026.3.0, and verify that bw_setup.js and bw1.js are absent.
  • Rotate credentials accessible to affected machines and CI/CD pipelines, including GitHub and npm tokens, SSH keys, AWS and GCP credentials, environment secrets, and AI-tool API keys.
  • Audit repositories accessible to affected accounts for unexpected branches, injected workflows, and repositories created by the malware; review CI/CD logs for installations of the compromised package.
  • Check network logs for connections to audit.checkmarx.cx and 94.154.172.43; the article says a confirmed connection means exfiltration occurred.
  • Use npm ci --ignore-scripts in CI/CD, pin exact dependency versions, and apply outbound network restrictions. The article reports that Harden Runner blocked the primary C2 connection in a controlled test.

Indicators of compromise

TypeIndicatorContext
DOMAINaudit[.]checkmarx[.]cxAttacker-controlled primary C2 domain used for encrypted data exfiltration.
IPV494[.]154[.]172[.]43IP address resolved for the attacker-controlled primary C2 domain.
SHA25618f784b3bc9a0bcdcb1a8d7f51bc5f54323fc40cbd874119354ab609bef6e4cbSHA-256 hash of the malicious package loader, bw_setup.js.
SHA2568605e365edf11160aad517c7d79a3b26b62290e5072ef97b102a01ddbb343f14SHA-256 hash of the malicious credential-stealing payload, bw1.js.
URLhxxps[:]//audit[.]checkmarx[.]cx/v1/telemetryPrimary C2 endpoint identified for exfiltrating collected data.

MITRE ATT&CK

T1005 · Data from Local SystemThe payload collected files and data from affected systems, including SSH keys, Git configuration, shell history, cloud credentials, and environment files.T1027 · Obfuscated Files or InformationThe article describes bw1.js as heavily obfuscated, with strings stored in a rotated lookup array and accessed through hex-indexed calls.T1041 · Exfiltration Over C2 ChannelThe payload encrypted collected data and sent it to the primary C2 endpoint.T1059.004 · Unix ShellThe payload used the shell command gh auth token to retrieve a GitHub CLI session token.T1059.007 · JavaScriptThe downloaded Bun runtime executed the obfuscated JavaScript payload.T1105 · Ingress Tool TransferThe package loader downloaded the Bun runtime during installation before executing the payload.T1195.002 · Compromise Software Supply ChainThe attacker modified the package publishing workflow and published a compromised @bitwarden/cli package to npm.T1528 · Steal Application Access TokenThe payload retrieved and validated GitHub tokens, including by running gh auth token and scanning environment variables.T1550.001 · Application Access TokenThe malware used stolen GitHub tokens to access repositories, enumerate Actions secrets, and inject workflows.T1552.001 · Credentials In FilesThe payload searched files such as .npmrc, .git-credentials, AWS credentials, GCP credentials, and .env for secrets.T1552.004 · Private KeysThe payload targeted SSH private-key files, including id_rsa, id_ed25519, id_ecdsa, and id_dsa.T1567.001 · Exfiltration to Code RepositoryThe article describes exfiltration by creating GitHub repositories and pushing encrypted result data to them.

Vendors

Products

Aidernpm compromise we have analyzed that explicitly enumerates Claude Code, Cursor, Kiro, Codex CLI, and Aider, treating ~/.claude.json and MCP server configs as first class exfiltration targets alongside cloud andBitwarden CLI@bitwarden/[email protected], the official command line interface for the Bitwarden password manager, was found compromised and republished on npm.BunThe compromised @bitwarden/[email protected] shipped with a preinstall hook that silently downloaded the Bun JavaScript runtime and launched a 9.7 MB obfuscated credential stealer. The stealer targeted SSH keys, npm andClaude Codetool configuration files. This is the first npm compromise we have analyzed that explicitly enumerates Claude Code, Cursor, Kiro, Codex CLI, and Aider, treating ~/.claude.json and MCP server configs as first classCodex CLIThis is the first npm compromise we have analyzed that explicitly enumerates Claude Code, Cursor, Kiro, Codex CLI, and Aider, treating ~/.claude.json and MCP server configs as first class exfiltration targets alongsideCursorfiles. This is the first npm compromise we have analyzed that explicitly enumerates Claude Code, Cursor, Kiro, Codex CLI, and Aider, treating ~/.claude.json and MCP server configs as first class exfiltrationGitHub Actionswas used to publish a compromised package, and the attack chain is one of the most sophisticated GitHub Actions supply chain compromises StepSecurity has analyzed to date.Kirofiles. This is the first npm compromise we have analyzed that explicitly enumerates Claude Code, Cursor, Kiro, Codex CLI, and Aider, treating ~/.claude.json and MCP server configs as first class exfiltration targets

Tools

Related Articles