Bitwarden 命令行介面遭供應鏈攻擊:沙蟲蠕蟲病毒分析

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 命令行介面遭供應鏈攻擊:沙蟲蠕蟲病毒分析

TL;DR

安全研究機構發現 Bitwarden 的 npm 套件遭惡意篡改,版本 2026.4.0 被植入名為「沙蟲」的自我複製蠕蟲病毒。雖然桌面版和瀏覽器插件目前安全,但超過一千萬用戶使用的命令行工具面臨風險,建議相關開發者立即檢查並更新系統。

Bitwarden CLI 遭「Shai-Hulud」供應鏈攻擊植入後門

根據 OX SecuritySocket 的最新分析證實,npm 上的 @bitwarden/cli 套件已被植入後門。受影響的惡意版本為 2026.4.0,當中包含一種名為「Shai-Hulud」的自我複製蠕蟲。是次攻擊針對開發人員及企業,在套件中注入名為 bw1.js 的檔案。雖然 Bitwarden 的桌面版程式及瀏覽器擴充功能(Extension)目前確認安全,但這款擁有超過 1,000 萬用戶的命令行界面(CLI)工具出現漏洞,已引起注重網絡安全與個人隱私的人士高度關注。

Shai Hulud 新聞

圖片來源:OX Security

惡意負載(Payload)技術分析

該惡意軟件會在安裝前的 preinstall 階段,透過名為 bw_setup.js 的指令碼執行。它會下載 Bun v1.3.13 以運行惡意的 bw1.js 代碼。值得注意的特點是其設有「俄語環境自殺開關」(Russian locale kill switch);惡意軟件會檢查主機系統語言,若設定為俄語則會自動停止運行。這顯示攻擊者可能意圖避免感染其所在地區的系統。對於擔心此類地域性威脅的用戶,使用 SquirrelVPN 有助於隱藏數碼足跡,進一步提升互聯網安全。

圖片

圖片來源:OX Security

數據外洩與 GitHub 整合

蠕蟲一旦啟動,便會搜刮大量敏感數據,目標包括 GitHub 權杖(Tokens)、AWS 憑證、Azure 權杖及 GCP 資訊。被盜取的數據會以 AES-256-GCM 加密,隨後上傳至受害者 GitHub 帳戶中新建立的公開儲存庫(Repository)。這些儲存庫通常使用《沙丘瀚戰》(Dune)相關的名稱,例如「Shai-Hulud: The Third Coming」。JFrog Security 的研究人員亦指出,該程式使用了 TruffleHog 工具來掃描受感染系統中隱藏的機密資訊。

Shai-Hulud 感染分析

圖片來源:OX Security

供應鏈傳播與持久化攻擊

此惡意軟件不僅會竊取數據,更會嘗試向外擴散。它利用盜取的 npm 權杖尋找開發者擁有編輯權限的其他套件,隨後將惡意代碼注入這些套件並重新發佈,形成連鎖反應。為了達成持久化(Persistence)潛伏,它會修改 ~/.bashrc~/.zshrc 等 Shell 設定檔。這種網絡安全趨勢凸顯了管理多重身分驗證(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