Product

Resources

Company

Malicious Packages/npm/bitwarden-cli-helper
High severityResolvednpmTyposquatCredential theft

bitwarden-cli-helper

A typosquat of a popular Bitwarden CLI wrapper that shipped a credential-exfil payload targeting developer machines. Pulled from npm roughly six hours after first public disclosure.

Are you affected?

Almost certainly not. You are only exposed if you installed bitwarden-cli-helper versions 1.4.2 or 1.4.3 between Apr 21, 17:00 UTC and Apr 22, 23:00 UTC. The official Bitwarden CLI (@bitwarden/cli) was never affected.

If your lockfile resolves to a pinned version from before Apr 21, you were never exposed. The malicious code didn't exist yet. Run this one command to check:

# From your project root
$ npm ls bitwarden-cli-helper
# If this returns "empty", you're clear.

What happened

On April 21, an attacker registered a newly-created npm account and published bitwarden-cli-helper. The name was chosen to blend in with the many community wrappers around @bitwarden/cli. The package listed a legitimate-looking README cribbed from a real Bitwarden helper, and claimed to offer simplified secret lookup.

The malicious payload ran from a postinstall script. It scanned for .bw-session, ~/.ssh/, environment variables starting with AWS_, GCP_, or BW_, and exfiltrated matches to an attacker-controlled endpoint over DNS-over-HTTPS to evade naive egress controls.

A developer flagged the package on social media around 17:45 UTC on Apr 22. npm's security team removed it by 23:00 UTC the same day.

Timeline

Apr 21 · 17:04 UTC
Malicious 1.4.2 published by newly-created npm account bw-helper-team.
Apr 22 · 09:18 UTC
Attacker publishes 1.4.3 with an updated payload and an additional DNS exfiltration path.
Apr 22 · 17:45 UTC
Security researcher posts a thread flagging the postinstall script. Downloads in 24h window: 1,847.
Apr 22 · 19:32 UTC
Root research team publishes this incident entry; customer builds confirmed unaffected.
Apr 22 · 23:00 UTC
npm removes the package and suspends the publishing account. GHSA-xxxx-xxxx-xxxx issued.

If you were exposed

If npm ls returns a match, treat any credential that was in scope during the install window as compromised. At minimum:

  • Rotate Bitwarden session tokens and re-unlock all vaults.
  • Rotate any AWS_, GCP_, or BW_ environment variable secrets present on the affected machine.
  • Review SSH key material under ~/.ssh/ and rotate anything without a passphrase.
  • Remove the package: npm uninstall bitwarden-cli-helper and delete your node_modules and package-lock.json before reinstalling.

Stay on the version you're on. Minus the CVEs.

Root patches your dependencies in place and vets every new release. Your code stays the same. Your risk doesn't.

Try Root free
Talk to a real human