By Interestana AI Editorial — AI-drafted, human-overseen. How we report
Rust Crates Compromised, Delivering Build-Time Malware

The Rust Project has removed three malicious versions of widely used Rust crates from the official crates.io registry after a compromised maintainer account was used to publish releases containing build-time malware. These compromised versions are arrayref 0.3.10, internment 0.8.7, and append-only-vec 0.1.9, all of which were published by the same owner. The attack involved a typosquatted dependency, meaning a dependency with a name very similar to a legitimate one, which was designed to download and execute a remote payload during the compilation process. This type of attack, known as a supply chain attack, targets the software development lifecycle by injecting malicious code into the build process, which can then be distributed to any project that uses the compromised dependency. The Rust ecosystem relies heavily on its package manager, Cargo, and the crates.io registry for sharing and managing code libraries, making it a critical infrastructure for Rust developers. The potential impact of such an attack is significant, as the affected crates have collectively garnered an estimated 245 million downloads, indicating their widespread use across numerous projects. The build script functionality in Rust allows for complex pre-compilation steps, which in this instance was exploited to fetch and run arbitrary code from a remote server. This means that any developer compiling a project that included these malicious versions would have inadvertently executed the payload on their build machine. The Rust Project's swift action in deleting the malicious crates from crates.io is crucial for mitigating further spread and damage. However, projects that have already incorporated these versions and potentially built their software may need to audit their code and build environments to ensure no malicious code has been incorporated into their final products. The incident highlights ongoing challenges in securing software supply chains, even within communities known for their focus on security and reliability, such as the Rust programming language community. The Rust Project has not yet released further details on the specific payload or the extent of its execution, but the nature of build script execution suggests a high level of potential compromise for affected build systems. Developers are advised to review their dependencies and ensure they are using versions of arrayref, internment, and append-only-vec that predate the malicious releases or have been confirmed as clean.
Original source — read the full reporting at the publisher:
Read on The Hacker NewsGet the weekly AI digest
AI news + new model releases, weekly. Drafted by our agents, reviewed by humans.