A sophisticated supply chain attack has compromised four widely used Laravel-Lang Composer packages after attackers rewrote hundreds of Git tags tied to historical versions, injecting malware into what developers believed were legitimate translation files. According to Security Affairs, the Laravel-Lang project — a community-driven effort providing localization and translation resources for Laravel applications — was targeted in what security researchers are calling a Git tag poisoning attack.

The incident exposes a fundamental weakness in how package managers handle version control history. Git tags are conventionally treated as immutable markers pointing to specific commits. When a developer pins a dependency to version 3.2.1, for example, Composer retrieves the code associated with that tag and assumes it has not changed since publication. This attack subverts that assumption by retroactively modifying tagged releases, meaning that even applications with strictly pinned dependencies could pull in malicious payloads without triggering any version change alerts.

The mechanism is straightforward but effective. Rather than publishing a new compromised version that would appear in update notifications, the attackers rewrote existing Git tags to point to modified commits containing malware. Because the version metadata remained unchanged, standard dependency scanners and automated update tools had nothing to flag. Any developer running composer install or composer update on an affected package would silently receive the poisoned code.

Laravel-Lang serves as a critical infrastructure component for multilingual Laravel applications worldwide. By compromising translation packages — files that developers rarely inspect directly — the attackers positioned their malware in a location likely to evade casual code review. Translation files are typically treated as static data rather than executable logic, making injected code harder to detect through routine audits.

For development teams, the incident underscores the fragility of open-source supply chain trust models. Community-maintained projects often operate without the resources to implement cryptographic tag signing, continuous integrity monitoring, or immutable tag enforcement — defenses that would make this class of attack significantly harder to execute.

Immediate remediation steps include auditing all composer.lock files for references to the affected Laravel-Lang packages, verifying package checksums against official releases, and clearing both local and CI/CD caches. Teams should upgrade to the latest patched versions and disable reliance on unpinned historical tags.

Longer-term, security experts recommend enforcing strict dependency pinning alongside automated vulnerability scanning tools such as Snyk or Dependabot. Integrating cryptographic signature verification and checksum validation directly into CI/CD pipelines can block unverified packages before they reach production environments.

The broader lesson extends beyond Laravel. The Composer ecosystem supports package signing and provenance tracking, but adoption remains inconsistent across community projects. Until registries implement mandatory tag immutability and automated integrity monitoring, retroactive supply chain attacks will remain a viable threat vector. For organizations that depend on open-source packages, treating every dependency as potentially mutable — and verifying accordingly — is no longer optional.


一場精密的供應鏈攻擊已入侵四個廣泛使用的 Laravel-Lang Composer 套件,攻擊者改寫了數百個與歷史版本相關的 Git 標籤,在開發人員以為是合法的翻譯檔案中注入惡意軟件。據 Security Affairs 報道,Laravel-Lang 項目是一個為 Laravel 應用程式提供本地化和翻譯資源的社區驅動項目,此次遭到的攻擊被安全研究人員稱為 Git tag poisoning 攻擊。

此次事件暴露了套件管理器在處理版本控制歷史方面的根本性弱點。Git 標籤傳統上被視為指向特定 commits 的不可變標記。例如,當開發人員將依賴固定至版本 3.2.1 時,Composer 會檢索與該標籤相關的代碼,並假設自發布以來未曾更改。此次攻擊通過追溯性地修改已標籤的版本,顛覆了這一假設,這意味著即使嚴格固定依賴的應用程式,亦可能在未觸發任何版本變更警告的情況下引入 malicious payloads。

其機制簡單但有效。攻擊者沒有發布會出現在更新通知中的新被篡改版本,而是改寫了現有的 Git 標籤,使其指向包含惡意軟件的已修改 commits。由於版本 metadata 保持不變,標準的依賴掃描器和自動更新工具沒有任何警示。任何在受影響套件上執行 composer installcomposer update 的開發人員,都會靜默地收到被毒化的代碼。

Laravel-Lang 是全球多語言 Laravel 應用程式的關鍵基礎設施組件。通過入侵翻譯套件——開發人員很少直接檢查的檔案——攻擊者將惡意軟件放置在可能逃避隨意代碼審查的位置。翻譯檔案通常被視為靜態數據而非可執行邏輯,使得注入的代碼更難通過常規審計發現。

對於開發團隊而言,此次事件突顯了 open source 供應鏈信任模型的脆弱性。社區維護的項目往往缺乏資源來實施加密標籤簽署、持續完整性監控或不可變標籤強制執行——這些防禦措施會使此類攻擊更難執行。

即時補救步驟包括審計所有 composer.lock 檔案,尋找受影響的 Laravel-Lang 套件引用,核對套件 checksums 與官方發行版本,以及清除本地和 CI/CD 快取。團隊應升級至最新的修補版本,並停用對未固定歷史標籤的依賴。

長期而言,安全專家建議實施嚴格的依賴固定,並配合自動漏洞掃描工具如 Snyk 或 Dependabot。將加密簽名驗證和 checksum 驗證直接整合到 CI/CD pipelines 中,可以在未經驗證的套件到達正式環境之前將其攔截。

更廣泛的教訓不僅限於 Laravel。Composer 生態系統支持套件簽署和來源追蹤,但在社區項目中的採用仍不一致。在註冊處實施強制標籤不可變性和自動完整性監控之前,追溯性供應鏈攻擊仍將是一個可行的 threat vector。對於依賴 open source 套件的組織而言,將每個依賴視為可能可變——並相應驗證——已不再是可選項。

新聞來源 / Original News Source