Skip to content
RCE Write-up Advanced

Your Password Manager Just Got Hacked The Bitwarden Supply Chain Attack

A malicious version of the official Bitwarden CLI package was published to npm after attackers compromised the CI/CD pipeline, causing a preinstall hook to run a credential-stealing worm on install. The worm harvested SSH keys, cloud credentials, developer tokens, and AI tool configs, then used stolen GitHub tokens to create public repositories for exfiltration and further propagation.

Dhanush N Follow

Published on infosecwriteups.com

If you installed the Bitwarden CLI from npm anytime on April 22, 2026, between 5:57 PM and 7:30 PM Eastern, your SSH keys, cloud credentials, GitHub tokens, npm tokens, environment variables, shell history and possibly your AI coding tool configurations have been stolen.

Dhanush N, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the attackers compromised the CI/CD pipeline that publishes the package, allowing them to inject malicious code into the official package under the legitimate name.

Impact

The malware stole a wide range of credentials and secrets from affected machines and used stolen GitHub tokens to propagate itself, potentially compromising other projects and CI/CD pipelines.

What the attacker needed

Install @bitwarden/[redacted] from npm; Install during the 93-minute window

The fix

Bitwarden removed the malicious version and is issuing a CVE; users should uninstall the affected version and rotate all credentials.

How it was found

  1. Install the affected version of the Bitwarden CLI from npm.
  2. The preinstall hook downloads the Bun runtime and executes an obfuscated payload.
  3. The payload scans the machine for credentials and secrets.
  4. Stolen GitHub tokens are used to create public repositories for exfiltration.
  5. The worm may also publish stolen tokens in public commits for other infected machines.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A widely used password manager's command-line tool was briefly replaced with a malicious version on npm, a public software repository. When developers installed it, hidden code ran automatically and stole their passwords, keys, and cloud access tokens. The stolen data was then used to spread the infection to other developers' projects.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Dhanush N

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.