Rust Supply Chain Attack Poisons Three Popular Crates with Infostealer
Attackers used a typosquatted dependency and build scripts to target developer credentials and crypto wallets.
A targeted supply chain attack on August 20, 2026, compromised three widely used Rust crates, exposing developers to a sophisticated infostealer payload. The breach highlights a persistent vulnerability in how build-time scripts can be weaponized to execute arbitrary code on developer machines.
Researchers at Nextron Systems GmbH first reported the incident, which affected the crates arrayref (v0.3.10), append-only-vec (v0.1.9), and internment (v0.8.7). The attackers gained access to the account of maintainer David Roundy (droundy) to inject a malicious dependency. This dependency, a typosquatted crate named 'proc-macro1' (v1.0.107), was designed to mimic the legitimate 'proc-macro2' crate.
Once integrated, the malware triggered automatically during the compilation process via a build.rs script. This mechanism allowed the payload to execute without requiring explicit function calls from the developer. The malicious versions remained available on the registry for a short window: arrayref for 86 minutes, internment for 90 minutes, and append-only-vec for 107 minutes, before the Rust Security Response Team deleted them.
The Payload and Persistence
The injected payload functioned as a cross-platform infostealer. According to security reports, the malware specifically targeted cryptocurrency wallet keys and credentials stored in Chromium-based browsers. To ensure long-term access on Apple systems, the malware established persistence on macOS by deploying a LaunchAgent.
Systemic Risks in Rust
This incident underscores a critical security gap in the Rust ecosystem regarding build.rs scripts. Because these scripts run with full user privileges during the build process, they can execute malicious code before any application logic is compiled. When such a vulnerability is introduced into low-level crates used by thousands of other projects, the risk extends beyond individual developers to global CI/CD pipelines.
Investigation and Outlook
The Rust Security Response Team indicated that the maintainer was likely a victim of stolen credentials or a compromised computer, rather than a malicious insider. This assessment suggests the account holder was a victim of credential theft.
Moving forward, the community is expected to scrutinize the permissions granted to build scripts. While the immediate threat was neutralized by the removal of the poisoned versions, the attack serves as a reminder of the fragility of trust in open-source registries and the necessity for more robust maintainer authentication methods.