CyberSecurityBoardThreat Intel · CVEs · Products
Malware

Rust Supply Chain Attack: Malicious Crates with 245M Downloads Target Build-Time Execution

August 20, 2026

On August 20, 2026, the Rust Project removed malicious versions of three widely used crates from crates.io after a compromised maintainer account published releases that added a typosquatted dependency with a build script that downloaded and executed a remote payload during compilation. The affected crates are arrayref 0.3.10, internment 0.8.7, and append-only-vec 0.1.9, all published from the same owner account and removed within 86 to 107 minutes.

The malicious code was embedded in the build script of a typosquatted dependency named proc-macro1, which mimics the legitimate proc-macro2 crate. The build script reassembled a payload host and command-and-control (C2) address from base64 fragments, disabled TLS validation by installing a custom certificate verifier, and selected one of four payloads based on the operating system and CPU architecture. On Unix and macOS, it wrote a binary to /tmp/rust-setup and executed it; on Windows, it launched a PowerShell script hidden via a VBScript launcher.

Delivery relied on the owner account yanking arrayref 0.3.5 through 0.3.9, leaving the compromised version as the only one Cargo would not warn about. The stage-2 implant beacons over HTTPS, persists via registry keys, LaunchAgents, or systemd services, and can steal browser credentials from Chrome, Brave, and Edge. Security researchers from Nextron Systems, Wiz, and StepSecurity analyzed the attack, noting infrastructure overlaps with recent North Korean supply chain attacks, including the Mastra npm compromise and the axios compromise. No CVE has been assigned, and no evidence of actual usage was found in RustSec advisories.

Developers are advised to search their local Cargo cache for the deleted crate files and pin arrayref to version 0.3.9 or earlier. The Rust Security Response Team is investigating the account compromise, and the incident highlights the need for cooldown periods on newly published packages, a feature not yet available in Cargo.

Attack groups: Sapphire Sleet, MIDNIGHT NEPTUNE

Malware: proc-macro1

Companies: Nextron Systems GmbH, Wiz, StepSecurity, Microsoft, Google Threat Intelligence Group, Mandiant

Products: arrayref, internment, append-only-vec, proc-macro2