Bitwarden CLI Compromised in Ongoing Checkmarx Supply Chain Campaign
The Bitwarden CLI npm package was compromised in a supply chain attack linked to the ongoing Checkmarx campaign. The malicious payload, injected via GitHub Actions, harvests extensive cloud and developer credentials, exfiltrating them through unauthorized GitHub repositories and a dedicated C2 server while employing a Russian locale kill switch and shell profile persistence.
Key Takeaways
- The Bitwarden CLI npm package (@bitwarden/cli2026.4.0) was compromised via a malicious file named bw1.js.
- The attack is part of the broader Checkmarx supply chain campaign, leveraging compromised GitHub Actions.
- The malware harvests extensive credentials (GitHub, AWS, Azure, GCP, npm, SSH) and exfiltrates them via Dune-themed GitHub repositories and a Checkmarx C2 endpoint.
- The payload features a Russian locale kill switch and establishes persistence via shell profile modifications (~/.bashrc, ~/.zshrc).
- The malware uses a downloaded Bun v1.3.13 interpreter and a Python memory-scraping script targeting GitHub Actions Runner.Worker.
Affected Systems
- Bitwarden CLI npm package (@bitwarden/cli2026.4.0)
- GitHub Actions CI/CD pipelines
- Developer endpoints (Linux/macOS)
Attack Chain
The attack begins with the compromise of the Bitwarden CLI npm package via a malicious GitHub Action workflow injection. Upon installation, the embedded bw1.js payload executes, utilizing a downloaded Bun interpreter to scrape memory and configuration files for cloud, npm, and SSH credentials. The malware establishes persistence by modifying shell profiles (~/.bashrc, ~/.zshrc) and avoids execution on Russian-locale systems. Finally, stolen credentials are exfiltrated to a remote C2 server and via encrypted commits to newly created, Dune-themed public GitHub repositories.
Detection Engineering Assessment
Required Log Sources
- EDR process execution logs
- File integrity monitoring (FIM)
- Network proxy/DNS logs
- GitHub audit logs
- Cloud provider CloudTrail/audit logs
Hunting Hypotheses
| Hypothesis | Telemetry | ATT&CK Stage | FP Risk |
|---|---|---|---|
| Look for unexpected modifications to ~/.bashrc or ~/.zshrc originating from package manager processes (npm, node). | EDR file modification logs | Persistence | Low |
| Search for the creation or presence of the specific lock file /tmp/tmp.987654321.lock. | EDR file creation logs | Execution | Low |
| Monitor for unexpected execution of the Bun interpreter (bun), especially if downloaded directly from GitHub releases to temporary directories. | EDR process execution logs | Execution | Medium |
| Hunt for DNS requests or network connections to audit.checkmarx[.]cx. | DNS logs, Network proxy logs | Command and Control | Low |
| Review GitHub audit logs for the sudden creation of public repositories matching the {word}-{word}-{3digits} pattern by developer accounts. | GitHub audit logs | Exfiltration | Low |
Control Gaps
- Lack of egress filtering for CI/CD runners
- Insufficient monitoring of GitHub repository creation by users
- Over-permissive npm tokens
Key Behavioral Indicators
- Creation of /tmp/tmp.987654321.lock
- Modifications to ~/.bashrc or ~/.zshrc during npm install
- Execution of Bun interpreter in CI/CD environments where it is not standard
- Creation of Dune-themed GitHub repositories
False Positive Assessment
- Low
Recommendations
Immediate Mitigation
- Remove the @bitwarden/cli2026.4.0 package from all developer systems and build environments.
- Rotate all potentially exposed credentials (GitHub tokens, npm tokens, AWS/Azure/GCP credentials, SSH keys).
- Check for unauthorized GitHub repository creation and suspicious workflow runs.
Infrastructure Hardening
- Lock down token scopes and require short-lived credentials.
- Restrict permissions for creating or publishing npm packages.
- Harden GitHub Actions permissions and disable unnecessary artifact access.
User Protection
- Monitor developer endpoints for outbound connections to audit.checkmarx[.]cx.
- Hunt for the presence of /tmp/tmp.987654321.lock and unauthorized shell profile modifications.
Security Awareness
- Educate developers on the risks of supply chain attacks and the importance of verifying package integrity.
- Train teams to recognize anomalous CI/CD pipeline behavior.
MITRE ATT&CK Mapping
- T1195.002 - Supply Chain Compromise: Compromise of Software Supply Chain
- T1552.001 - Unsecured Credentials: Credentials In Files
- T1552.004 - Unsecured Credentials: Private Keys
- T1546.004 - Event Triggered Execution: Unix Shell Configuration Modification
- T1614.001 - System Location Discovery: System Language Discovery
- T1567.001 - Exfiltration Over Web Service: Exfiltration to Code Repository
- T1071.001 - Application Layer Protocol: Web Protocols
- domainaudit[.]checkmarx[[.]]cxC2 endpoint domain used for telemetry and exfiltration.
- file_path/tmp/tmp.987654321.lockHardcoded lock file used by the malware to prevent multiple instances from running simultaneously.