Security researchers at JFrog and Socket have uncovered a supply chain attack targeting the Bitwarden command-line interface. If you use the Bitwarden CLI via npm, here's what happened, whether you're affected, and what to do right now.
What Happened?
A supply chain attack is when hackers don't target your machine directly. Instead, they poison a software package so that installing it does the damage for them. That's exactly what happened here.
Version 2026.4.0 of the @bitwarden/cli npm package was secretly
modified to include malicious code in a file called bw1.js. The attack was
made possible by compromising a GitHub Action inside Bitwarden's automated build pipeline
(CI/CD), which then published the tampered package to npm.
Once installed, the malicious code runs automatically via a preinstall hook, before you've even finished installing the package. It then silently steals:
- GitHub and npm tokens
- SSH keys
- Environment variables (
.envfiles) - Shell history
- Cloud credentials (AWS, GCP, Azure, etc.)
- Config files for AI coding tools including Claude, Cursor, Codex CLI, Kiro, and Aider
All stolen data is encrypted with AES-256-GCM and sent to a fake Checkmarx domain
(audit.checkmarx[.]cx), with a GitHub repository used as a fallback channel
if the primary method fails.
The attack doesn't stop there. If the malware finds valid GitHub tokens on your machine, it uses them to inject malicious workflows into your own repositories and steal secrets from every CI/CD pipeline your account has access to, turning a single compromised developer into an entry point for a much broader attack.
Security researchers noted this is believed to be the first known case of a package published via npm's trusted publishing mechanism being weaponized in this way.
Am I Affected?
You are likely affected if all three of the following are true:
- You use the Bitwarden CLI (the command-line app, not the browser extension, desktop app, or mobile app)
- You installed or updated it recently and received version 2026.4.0 specifically
- You installed it via npm (e.g.
npm install -g @bitwarden/cli)
If you only use the Bitwarden browser extension, desktop app, or mobile app, you are not affected. This attack was isolated to the CLI npm package.
To check your installed version, run:
bw --version
If the output is 2026.4.0, treat your machine as compromised and act immediately.
What Should You Do?
1. Check Your Version
Run bw --version. If it returns 2026.4.0, proceed through
all the steps below without delay.
2. Reinstall the Bitwarden CLI
The malicious version has been pulled from npm. Uninstall the current version and reinstall a clean one from Bitwarden's official releases.
npm uninstall -g @bitwarden/cli
npm install -g @bitwarden/cli
Verify the newly installed version is not 2026.4.0 before continuing to use it.
3. Rotate All Your Secrets
If you had the compromised version installed, assume the following credentials have been stolen and rotate all of them immediately:
- GitHub personal access tokens
- npm access tokens
- SSH keys
- Cloud credentials (AWS, GCP, Azure, and any others stored locally)
- Any secrets stored in
.envfiles
4. Audit Your GitHub Repositories and CI/CD Pipelines
Check all repositories your GitHub account has access to for any unfamiliar or newly added Actions workflows, particularly any you did not create yourself. Review recent workflow run logs for unexpected behaviour.
5. Review AI Coding Tool Configurations
The malware specifically targeted config files for AI coding tools. If you use Claude, Cursor, Codex CLI, Kiro, or Aider, inspect their configuration files for anything suspicious or unfamiliar.
Sources: JFrog, Socket, StepSecurity, security researcher Adnan Khan. This post is based on findings published in April 2026.