TB
Tech Bytes
Supply Chain Security Source: Ars Technica August 20, 2026

Malicious Rust Crate 'arrayref' Discovered Executing Remote Payloads in Build Scripts

Malicious Rust Crate 'arrayref' Discovered Executing Remote Payloads in Build Scripts

Open-source security firm SafeDep has discovered a malicious package published to the Rust community registry crates.io under a typo-squatted name mimicking the legitimate `arrayref` crate. The compromised package contained stealthy procedural macros designed to execute remote code during cargo build compilation.

Get Tech Pulse Daily in Your Inbox

Join 45,000+ engineers, founders, and tech leaders receiving high-signal daily breakdowns directly from major publishers.

Zero spam. Unsubscribe anytime in one click.

When a developer includes the malicious dependency, the crate `build.rs` script fetches an obfuscated binary payload from an external server and executes it with local user permissions, attempting to extract environment variables and SSH private keys.

The crates.io security team acted swiftly to remove the malicious version and revoke publisher credentials, urging Rust developers to lock dependency lockfiles.