Malware Lurks in Popular Rust Crates After Supply Chain Attack
Two widely-used Rust packages, arrayref and append-only-vec, were compromised via a malicious dependency, leading to the distribution of infostealer malware.

A significant supply chain attack has compromised two popular Rust crates, arrayref and append-only-vec, which collectively boast hundreds of millions of downloads. The compromise was achieved by injecting a malicious dependency, named proc-macro1, which mimicked a legitimate crate to evade detection. This incident represents one of the largest Rust crate compromises by download volume to date.
The attack exploited Cargo's build process, a mechanism that automatically compiles and runs build scripts. The malicious crate, proc-macro1, was disguised as a typosquat of the legitimate proc-macro2 crate, complete with copied documentation. Crucially, the visible source code of arrayref and append-only-vec remained untouched, meaning manual code reviews would not have flagged the compromise. The danger lay within proc-macro1's build.rs script, which executed arbitrary code during the build process without requiring any direct interaction from developers.
Upon execution, the build script downloaded a platform-specific binary from a remote IP address, using base64 encoding to obscure the destination. On Unix-like systems, the payload was written to disk, marked as executable, and launched as a detached background process. This ensured the malware continued to run even after the build process concluded, making it difficult to detect.
Analysis of the downloaded binaries revealed an infostealer capable of harvesting credentials from Chromium-based browsers such as Chrome, Brave, and Edge. It also targeted data stored in browser extension storage, a common location for cryptocurrency wallet extensions. The malware's capabilities mirrored those of dedicated credential-stealing malware, designed for rapid host enumeration and data exfiltration.
Further analysis showed that on macOS, the malware established persistence by configuring a LaunchAgent to relaunch itself upon every login. It also maintained communication with a command-and-control server, allowing attackers to issue remote shell commands. The stealthy nature of this attack was attributed to its abuse of standard build automation tools rather than direct modification of application logic.
The Rust Security Response Team, alerted by researchers from Aikido Security and Nextron Systems, quickly acted to mitigate the threat. They yanked proc-macro1 and several related lookalike packages, including proc-macro-en, aovine, arone, aronenao, and tinymember. The tainted versions of arrayref (0.3.10), append-only-vec (0.1.9), and internment (0.8.7) were also removed. The compromised maintainer's account, belonging to Andrew Gallant, was locked as a precautionary measure, with evidence suggesting the account holder was a victim of credential theft.
This incident, which unfolded rapidly within a two-hour window on August 20, 2026, highlights a persistent vulnerability in open-source package ecosystems. Build-time scripts can execute arbitrary code with full user privileges before application logic is even processed, underscoring the critical need for rigorous verification of dependency trust, alongside source code reviews. Developers and organizations that built projects during the incident window are advised to treat their CI pipelines and local build caches as potentially compromised, audit recent build logs, and consider pinning affected dependencies to earlier, untainted versions.
The new article provides further technical details on the malicious payload's execution, including its methods for disabling TLS validation and its platform-specific deployment on Unix, macOS, and Windows. It also highlights that the delivery mechanism relied on the maintainer yanking previous versions of the arrayref crate, leaving the malicious version as the only non-yanked option for developers to update to.
This new report attributes the Rust supply chain attack, which involved a malicious version of the arrayref crate and a dependency fetching a payload from a remote server, to North Korean threat actors. This adds a significant attribution layer to the previously reported compromise of popular Rust packages.
New analysis from Wiz security researchers has directly attributed this supply chain attack to state-sponsored North Korean threat actors, specifically identifying the group as Sapphire Sleet. The researchers found significant overlaps in command-and-control infrastructure and network communication patterns with previous North Korean campaigns, including the Mastra framework compromise and poisoned npm packages targeting the Axios library. This attribution highlights the increasing sophistication and reach of nation-state actors into developer ecosystems.
This new report details the specific mechanism of the supply chain attack, revealing that the malicious code was embedded within the build script of a typosquatted dependency, proc-macro1. This script was designed to identify the target system's architecture, download a matching payload, and execute it, with payloads found for Linux, Windows, and both Intel and Apple Silicon Macs. The malware specifically targeted browser credentials, including those for cryptocurrency wallet extensions, and had the capability to establish persistence and receive commands remotely.