Hackers poison arrayref Rust crate to push infostealer malware

A devastating supply-chain attack has compromised the popular Rust crate arrayref, allowing hackers to push infostealer malware onto developers’ systems during compilation. The malicious code was injected into the crate by an attacker who had access to the maintainer’s account and exploited a vulnerability in the package management system.

The attack, which occurred on August 20th, targeted not only arrayref but also two other crates, append-only-vec and internment. The malware executed during compilation, spreading its payload across various operating systems including Linux, Windows, and macOS. Researchers from StepSecurity noted that the attacker injected a dependency on a package called proc-macro1, which was disguised as a legitimate crate to evade detection.

The malicious code uses a script in proc-macro1 to reconstruct its infrastructure from base64-encoded fragments and select a payload matching the host OS. Once executed, the malware collects credentials from browsers like Google Chrome, Brave, and Edge by querying SQLite login databases. Persistence is established via the Registry Run key on Windows, LaunchAgent on macOS, and systemd on Linux.

The impact of this attack is significant, with arrayref alone boasting over 245 million lifetime downloads. Projects using arrayref include blake3, Rust GUI frameworks like egui and eframe, and components used in Ethereum and Solana. The collective count for append-only-vec and internment is nearly 19 million installs.

The attackers’ tactics indicate a high level of sophistication, with overlaps in infrastructure observed between this campaign and recent DPRK supply chain attacks. Researchers note that the malware’s capabilities include exfiltrating host information and credentials, making it essential to take immediate action upon detection.

Developers who installed arrayref during the exposure window of nearly 1.5 hours should assume their systems are compromised. Recommended checks include searching Cargo.lock files for dropped files and reviewing traffic to specific IP addresses. In cases where compromise is confirmed, experts recommend rotating all accessible credentials, CI tokens, signing keys, and other secrets, and rebuilding the environment from safe backups.

To mitigate future attacks, developers should prioritize pinning known-safe versions of affected dependencies until the maintainer situation is clarified and resolved. This incident serves as a stark reminder of the importance of supply-chain security in software development and the need for robust defense strategies to prevent such attacks from happening in the first place.


Source: Bleeping Computer — 2026-08-20