Skip to main content
Bitwarden CLI Hijacked for 90 Minutes: A CI/CD Pipeline Breach TeardownIncident
4 min readFor Compliance Teams

Bitwarden CLI Hijacked for 90 Minutes: A CI/CD Pipeline Breach Teardown

On April 22, 2025, developers who updated the Bitwarden CLI to version 2026.4.0 installed malware designed to exfiltrate their most sensitive credentials. The window was narrow—just over 90 minutes—but the attack surface was vast: GitHub tokens, npm credentials, SSH keys, and cloud provider secrets for AWS, GCP, and Azure.

This wasn't a vulnerability in Bitwarden's code. This was a supply chain attack that compromised the build and distribution pipeline itself.

What Happened

Attackers linked to the TeamPCP group and the broader Checkmarx supply chain campaign infiltrated Bitwarden's CI/CD pipeline. They injected malicious code into the legitimate Bitwarden CLI package during the build process, creating a trojanized version that appeared authentic to package managers and developer workstations.

The malware specifically targeted developer secrets—the credentials that grant access to source code repositories, package registries, and cloud infrastructure. If you ran npm install or updated your Bitwarden CLI during that 90-minute window, the compromise happened silently in the background.

Bitwarden detected and contained the incident quickly, but the attack demonstrates a fundamental problem: your CI/CD pipeline is now a primary attack vector, and most organizations treat it as trusted infrastructure rather than a threat boundary.

Timeline

April 22, ~90-minute window: Compromised version 2026.4.0 published to npm registry
April 22, end of window: Bitwarden identifies the compromise
April 22, immediate response: Malicious package removed from npm; Bitwarden issues public advisory
Post-incident: Investigation reveals targeting of GitHub/npm tokens, SSH material, and cloud provider credentials

The speed matters here. Ninety minutes is enough time for thousands of automated dependency updates to pull a compromised package. Every CI/CD job that ran during that window potentially installed the malware.

Which Controls Failed or Were Missing

Build environment isolation: The attackers gained sufficient access to inject code during the build process. This suggests the build environment either lacked network segmentation from untrusted networks or had inadequate access controls for build artifacts.

Artifact signing and verification: While many organizations sign release artifacts, fewer verify signatures at every stage of the pipeline. If intermediate build steps don't validate signatures, an attacker who compromises one stage can propagate malicious code forward.

Secrets management in CI/CD: The attack succeeded because the build environment had access to publishing credentials for npm. Those credentials should have been scoped to specific jobs, time-limited, and protected by approval workflows for production releases.

Dependency pinning and lock files: Organizations that auto-update dependencies or use loose version constraints (^2.0.0 instead of 2026.3.0) pulled the malicious version automatically. No human review occurred.

Runtime monitoring: The malicious code exfiltrated credentials, but most development environments lack the monitoring that would detect unusual network connections or file access patterns from CLI tools.

What the Standards Require

PCI DSS v4.0.1 Requirement 6.3.2 mandates that custom software be developed securely based on industry standards. This includes the build pipeline itself—your CI/CD environment is part of your software development lifecycle and must be secured accordingly.

NIST 800-53 Rev 5 SA-10 (Developer Configuration Management) requires organizations to manage configurations during system development, implementation, and operation. This extends to controlling what gets built, how it gets built, and who can modify the build process.

ISO/IEC 27001:2022 Annex A.8.31 (Separation of Development, Test and Production Environments) requires logical or physical separation between environments. Your build environment should be treated as production infrastructure, not a development sandbox. Access should be restricted, monitored, and logged.

SOC 2 Type II CC6.6 addresses the logical and physical access controls for system components. This includes your CI/CD infrastructure. If you're pursuing SOC 2 certification, your auditor will ask how you control access to build systems and publishing credentials.

The gap isn't in the standards—it's in how organizations interpret "secure development." Most security teams focus on the code being built, not the infrastructure that builds it.

Lessons and Action Items for Your Team

Treat your CI/CD pipeline as a privileged environment. Apply the same access controls, monitoring, and change management you use for production systems. If an attacker compromises your pipeline, they compromise everything you build.

Implement artifact signing at every stage. Sign build outputs immediately after compilation, before any subsequent steps. Verify signatures before publishing. Use a hardware security module (HSM) or cloud KMS for signing keys—never store them as environment variables or in source control.

Scope publishing credentials tightly. Your CI/CD system needs credentials to publish packages, but those credentials should be:

  • Limited to specific package namespaces
  • Time-bound (rotate frequently, ideally per-build)
  • Protected by approval workflows for production releases
  • Monitored for unusual usage patterns

Pin dependencies with lock files. Use package-lock.json, Gemfile.lock, requirements.txt with hashes, or equivalent for your ecosystem. Review dependency updates in pull requests before merging. Automated updates are convenient until they're not.

Monitor build environments for anomalies. Network connections from build jobs should be predictable: package registries, source control, artifact storage. Outbound connections to unfamiliar domains during builds should trigger alerts. Tools like Falco or native cloud provider monitoring can detect this.

Segment build networks. Your build environment doesn't need access to your production database or internal APIs. Use network policies to restrict build jobs to only the external services they legitimately need.

Audit third-party actions and plugins. GitHub Actions, Jenkins plugins, GitLab CI components—these run in your pipeline with your credentials. Treat them as code you're responsible for. Pin versions, review changes, and maintain an inventory of what's running.

The Bitwarden incident was contained quickly because the organization had detection capabilities and incident response processes in place. The malicious package was live for 90 minutes, not 90 days. But 90 minutes is still enough time for significant damage if your team doesn't have the controls to detect and respond.

Your CI/CD pipeline is infrastructure. Secure it like infrastructure.

Topics:Incident

You Might Also Like