Bitwarden 命令行工具遭 Shai-Hulud 供应链攻击

Bitwarden CLI compromise Shai-Hulud malware npm supply chain attack cybersecurity news GitHub token theft developer security
N
Natalie Ferreira

Consumer Privacy & Identity Theft Prevention Writer

 
2026年4月24日
3 分钟阅读
Bitwarden 命令行工具遭 Shai-Hulud 供应链攻击

TL;DR

安全研究人员发现 Bitwarden 的 npm 命令行工具(CLI)遭到供应链攻击。恶意版本 2026.4.0 被注入了名为 Shai-Hulud 的自传播蠕虫脚本。虽然桌面端和浏览器扩展程序不受影响,但使用 CLI 的开发者和企业面临严重的隐私泄露风险。

Bitwarden 命令行工具遭遇 Shai-Hulud 供应链攻击

根据 OX SecuritySocket 的最新分析确认,npm 上的 @bitwarden/cli 软件包已被植入后门。该恶意版本号为 2026.4.0,其中包含一个名为“Shai-Hulud”的自传播蠕虫病毒。此次攻击通过在软件包中注入名为 bw1.js 的文件,专门针对开发者和企业用户。虽然 Bitwarden 的桌面客户端和浏览器扩展程序目前确认安全,但这款拥有超过 1000 万用户的命令行工具(CLI)遭到入侵,已引起在线安全与隐私管理人员的高度关注。

Shai Hulud 新闻

图片来源:OX Security

恶意负载技术分析

该恶意软件在安装前的 preinstall 阶段通过名为 bw_setup.js 的脚本执行。它会下载 Bun v1.3.13 运行环境来执行恶意的 bw1.js 代码。一个值得注意的特征是其内置的“俄语环境自毁开关”:恶意软件会检查宿主机的系统语言,如果检测到设置为俄语,则会自动退出。这表明攻击者可能意在避免感染其所在地区的系统。对于担心此类地域性威胁的用户,使用松鼠加速器(SquirrelVPN)可以有效隐藏您的数字足迹,提升互联网安全性。

分析图

图片来源:OX Security

数据窃取与 GitHub 集成

该蠕虫病毒一旦激活,就会搜刮大量敏感数据。其目标包括 GitHub 令牌、亚马逊云服务(AWS) 凭据、Azure 令牌以及 谷歌云平台(GCP) 的信息。被盗数据经 AES-256-GCM 加密后,会被上传到受害者 GitHub 账户下新创建的公开代码库中。这些代码库通常使用《沙丘》主题的命名方式,如“Shai-Hulud: The Third Coming”。JFrog Security 的研究人员还发现,该病毒利用 TruffleHog 工具在受感染系统中扫描隐藏的机密信息。

Shai-Hulud 感染分析

图片来源:OX Security

供应链传播与持久化

该恶意软件不仅窃取数据,还会尝试自我传播。它利用窃取的 npm 令牌寻找开发者拥有编辑权限的其他软件包,随后将恶意代码注入这些包中并重新发布,从而开启新一轮的感染循环。为了实现持久化驻留,它会修改 shell 配置文件,如 ~/.bashrc~/.zshrc。这种网络安全威胁趋势再次证明,对于任何技术爱好者而言,管理多重身份验证(MFA)和定期更换密钥都是至关重要的。

分析图

图片来源:OX Security

建议的安全检查清单

如果您在过去 24 小时内使用过 Bitwarden CLI,请立即采取以下步骤确保环境安全:

  • 立即降级: 将您的 npm 软件包 版本更改为 2026.3.0 或更低版本。
  • 更换所有密钥: 包括 GitHub 个人访问令牌、AWS 访问密钥以及 npm 令牌。
  • 审计代码库: 检查您的 GitHub 账户中是否存在描述包含“Shai-Hulud”的未经授权的公开仓库。
  • 排查持久化风险: 查找路径为 /tmp/tmp.987654321.lock 的锁定文件,并检查您的 shell 配置文件中是否有可疑代码。
  • 启用双重认证(2FA): 务必在所有开发者和云账户上使用多重身份验证,以确保即使令牌被盗,攻击者也无法轻易访问。

分析图

图片来源:OX Security

关注 squirrelvpn.com,获取专家级深度洞察,保护您的数字生活,走在网络安全威胁的前沿。

N
Natalie Ferreira

Consumer Privacy & Identity Theft Prevention Writer

 

Natalie Ferreira is a consumer technology writer who specializes in identity theft prevention, online safety, and digital literacy. After experiencing identity theft firsthand, she dedicated her career to educating the public about personal data protection. Natalie has written for major consumer technology outlets and holds a degree in Journalism from Columbia University. She focuses on making cybersecurity approachable for families, seniors, and first-time internet users who may feel overwhelmed by the technical jargon.

相关新闻

Mullvad VPN Enhances iOS App Security with New Traffic Feature
iOS VPN security

Mullvad VPN Enhances iOS App Security with New Traffic Feature

Discover how iOS VPNs are fighting TunnelCrack attacks with the Force All Apps feature. Learn the technical trade-offs of the includeAllNetworks setting. Read more.

作者 Viktor Sokolov 2026年4月23日 3 分钟阅读
common.read_full_article
NymVPN Introduces Split-Tunneling for Windows and Mac Users
NymVPN

NymVPN Introduces Split-Tunneling for Windows and Mac Users

NymVPN launches split-tunneling for Windows and macOS alongside the Lewes Protocol for post-quantum encryption. Upgrade your privacy and connection speed now.

作者 Natalie Ferreira 2026年4月22日 3 分钟阅读
common.read_full_article
Quantum Encryption Threat: Are Your Public Banks Prepared?
Quantum Computing Banking

Quantum Encryption Threat: Are Your Public Banks Prepared?

Indian banks face a 'Q-Day' crisis as quantum computers threaten to break RSA encryption. Discover how RBI and the National Quantum Mission are securing your data.

作者 Tom Jefferson 2026年4月20日 2 分钟阅读
common.read_full_article
WireGuard VPN Developer Unable to Release Updates After Microsoft Lock
WireGuard

WireGuard VPN Developer Unable to Release Updates After Microsoft Lock

Microsoft's account lockout has halted critical security updates for WireGuard and VeraCrypt. Read how this verification glitch threatens VPN and encryption security.

作者 Daniel Richter 2026年4月17日 2 分钟阅读
common.read_full_article