Advertising Disclosure: Some links on this site are affiliate links. We may earn a commission when you make a purchase — at no extra cost to you. read our methodology

Bitwarden CLI NPM Supply Chain Attack: What Users Need to Know

The Bitwarden CLI was compromised via a supply chain attack on April 22, 2026. Here is what happened, who is affected, and what you should do.

Disclosure: Omellody is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more

Published: April 26, 2026 | Category: Cybersecurity News

On April 22, 2026, the Bitwarden command-line interface (CLI) was compromised in a software supply chain attack. The malicious package @bitwarden/[email protected] was available on NPM for approximately 1.5 hours before being contained. Here's everything you need to know.

Jump to:


What Happened

On April 22, 2026, between 5:57 PM and 7:30 PM ET, a malicious version of the Bitwarden CLI was published to NPM. The attack was part of a broader campaign known as the Checkmarx supply chain incident, which has targeted multiple open-source projects.

Timeline of Events

Time (ET)Event
~5:53 PMAttacker exploits compromised GitHub Action in Bitwarden's CI/CD pipeline
~5:57 PMMalicious @bitwarden/[email protected] published to NPM
~6:01 PMMalicious package begins exfiltrating developer credentials
~7:30 PMBitwarden security team identifies and removes the package
April 23Bitwarden publishes official statement confirming containment

How the Attack Worked

The attacker leveraged a compromised GitHub Action in Bitwarden's CI/CD pipeline. Three malicious lines were injected into the publish-cli.yml workflow:

  1. The NPM publish token was double-base64 encoded and printed to CI log output
  2. The attacker decoded the token from the logs
  3. A pre-built malicious .tgz package was published using the stolen token

This is notable because it's believed to be the first time a package using NPM's trusted publishing mechanism has been compromised, according to security researcher Adnan Khan.

What the Malicious Package Did

The compromised CLI package contained the Shai-Hulud worm, which:

  • Harvested developer credentials — NPM tokens, GitHub tokens, environment variables
  • Exfiltrated secrets to attacker-controlled servers
  • Infected AI coding assistants — the worm could poison AI agents and spread to other projects in a worm-like fashion
  • Self-propagated — attempted to spread to other NPM packages the developer had publish access to

Who Is Affected

The good news: This attack has a very narrow impact window.

Affected

  • Developers who installed @bitwarden/[email protected] via NPM between 5:57 PM and 7:30 PM ET on April 22
  • CI/CD pipelines that auto-updated to the latest CLI version during that window
  • AI coding agents that processed or installed the malicious package

NOT Affected

  • Regular Bitwarden users — the desktop app, browser extension, and mobile apps were NOT compromised
  • Bitwarden vault data — no user vaults or production systems were accessed
  • Users who installed the CLI before or after the 1.5-hour window
  • Users who installed via other channels (Homebrew, Snap, Chocolatey, direct download)

What You Should Do

If You're a Regular Bitwarden User

Your vault is safe. This attack only affected the CLI package distributed through NPM. If you use Bitwarden through the browser extension, desktop app, or mobile app, you are not affected.

No action is required, but it's always good practice to:

  1. Enable two-factor authentication on your Bitwarden account if you haven't already
  2. Review your vault for any suspicious changes
  3. Update to the latest version of whichever Bitwarden client you use

If You're a Developer Using the CLI

  1. Check your installed version: Run bw --version — if it shows 2026.4.0, update immediately
  2. Rotate all secrets: NPM tokens, GitHub tokens, API keys, and any credentials in your environment
  3. Audit CI/CD logs: Check for unexpected package installations during the attack window
  4. Scan for the Shai-Hulud worm: Check if any of your published packages were modified
  5. Review AI agent activity: If you use AI coding assistants, check for unexpected commits or package modifications

If You Use AI Coding Agents

The Shai-Hulud worm specifically targets AI assistants. If your AI agent processed the malicious package:

  1. Review all commits made by the AI agent after April 22
  2. Check published packages for unauthorized modifications
  3. Rotate all tokens the AI agent had access to

Is Your Vault Safe?

Yes. Bitwarden's official statement confirms:

"No user vault data or production systems were compromised or at-risk."

The attack targeted the NPM distribution path only — specifically the CLI tool used by developers. The vault encryption architecture (AES-256-CBC with PBKDF2/Argon2) was not affected.

This is an important distinction: even though the CLI can access vaults, the malicious code focused on harvesting developer credentials and NPM tokens, not on decrypting user vaults.


The Shai-Hulud Worm Explained

The "Shai-Hulud" worm (named after the sandworms in Frank Herbert's Dune) is a self-propagating malware that has appeared in multiple NPM supply chain attacks in 2026.

How It Spreads

  1. Initial infection: Malicious code is injected into a popular package
  2. Credential harvesting: The worm collects NPM tokens, GitHub tokens, and other secrets from the developer's environment
  3. AI agent poisoning: The worm can infect AI coding assistants, causing them to unknowingly spread the malware to other projects
  4. Self-propagation: Using stolen NPM tokens, the worm publishes malicious versions of other packages the developer maintains

Why It's Dangerous

Traditional supply chain attacks are one-and-done. The Shai-Hulud worm is different because it multiplies — each infected developer becomes a vector for infecting more packages. The AI agent poisoning vector is particularly concerning, as it can spread without human awareness.

Previous Shai-Hulud Incidents

This is the third known appearance of the Shai-Hulud worm on NPM in 2026, but the Bitwarden incident is the highest-profile target to date.


Broader Implications

For Password Manager Users

This incident highlights an important truth: no software is immune to supply chain attacks. However, it also demonstrates that well-architected security can limit the blast radius:

  • Bitwarden's vault encryption is independent of the CLI distribution
  • The attack was contained within 1.5 hours
  • User data was not compromised

For the Open-Source Ecosystem

The Checkmarx campaign has now compromised multiple high-profile open-source projects. Key takeaways:

  1. NPM trusted publishing is not bulletproof — CI/CD pipeline security is critical
  2. AI coding agents are a new attack surface — the Shai-Hulud worm specifically targets them
  3. Supply chain security requires defense in depth — no single mechanism is sufficient

Our Recommendations

Best Password Managers After This Incident

Bitwarden remains a strong choice — this attack didn't compromise user data, and their response was swift. But if you're reconsidering your options:

Password ManagerScoreWhy Consider
Bitwarden9.1/10Open-source, audited, best value. This incident didn't affect user vaults
1Password9.3/10Never breached, excellent security architecture
NordPass8.5/10Zero-knowledge architecture, NordVPN ecosystem
Dashlane8.7/10Built-in VPN, dark web monitoring
Keeper8.6/10Strong enterprise features, zero-knowledge

General Security Best Practices

  1. Use a password manager — despite this incident, password managers are still far safer than reusing passwords
  2. Enable 2FA everywhere — especially on your password manager account
  3. Keep software updated — but consider pinning versions in CI/CD pipelines
  4. Monitor for breaches — use services like Aura for identity theft monitoring
  5. Diversify your security stack — don't rely on a single tool for all security needs

Compare Password Managers →


FAQs

Was my Bitwarden vault hacked?

No. The attack only affected the CLI package on NPM. Your vault data, browser extension, desktop app, and mobile app were not compromised.

Do I need to change my master password?

Not because of this incident. However, regularly rotating your master password is good practice.

Should I switch from Bitwarden?

Not necessarily. Bitwarden's response was swift (contained within 1.5 hours), and no user data was compromised. The open-source nature of Bitwarden actually helps — the community can audit the code. See our Bitwarden alternatives if you want to explore options.

What is a supply chain attack?

A supply chain attack targets the software delivery pipeline rather than the software itself. Instead of hacking Bitwarden's servers, the attacker compromised the CI/CD pipeline that publishes the CLI to NPM.

How can I protect myself from supply chain attacks?

Pin dependency versions, use lockfiles, enable 2FA on package registries, audit your dependencies regularly, and consider using tools like Socket.dev or Snyk to monitor for malicious packages.

Is open-source software less secure because of this?

No. Open-source software is actually more transparent — this attack was quickly identified partly because the code is publicly auditable. Closed-source software can have the same vulnerabilities, but they're harder to detect.

What is the Shai-Hulud worm?

A self-propagating malware that spreads through NPM by stealing developer credentials and publishing malicious versions of their packages. It can also infect AI coding assistants to spread without human awareness.


See also: Bitwarden Review 2026 | Are Password Managers Safe? | Bitwarden Alternatives | Best Password Managers 2026

SC
Written by , Lead Technology Analyst | Updated April 2026 | Our Methodology