cargo build stopped being a safe verb: arrayref 0.3.10 ran a payload at compile time
The Rust Security Response Team deleted proc-macro1 and arrayref 0.3.10 on August 20 after a build script fetched and launched a binary. The lure was a yank warning.
The Engineer · Build desk
What happened
- On 2026-08-20 at 7:15 UTC the Rust project received a report that the proc-macro1 crate was malicious; the Rust Security Response Team verified that the crate had a build script downloading a malicious payload.
- SafeDep, co-founded by Abhisek Datta, reported on August 20, 2026 that a compromised release of the Rust crate arrayref downloaded and executed malware during compilation; a developer only had to compile a project whose dependency resolution selected the poisoned release.
- arrayref version 0.3.10 added a dependency on proc-macro1, a package impersonating the legitimate proc-macro2.
- Cargo automatically compiled the proc-macro1 dependency, which caused its build.rs script to fetch and launch a binary from a remote server.
- SafeDep found that arrayref retained its familiar macro implementation and that the important change was a single dependency entry in Cargo.toml; Cargo builds declared non-optional dependencies even when the parent crate never calls them.
Why it matters
On 2026-08-20 at 07:15 UTC the Rust Security Response Team received a report that the crate `proc-macro1` was malicious, and verified that it shipped a build script which downloaded a payload [9]. The operational consequence is narrow and unpleasant: on an unpinned dependency tree, compiling a project was enough to fetch and launch a remote binary, according to SafeDep, which published its analysis the same day [1].
The mechanism was one line of metadata. `arrayref` 0.3.10 added a dependency on `proc-macro1`, a package impersonating the legitimate `proc-macro2` [2]. Cargo compiled it, and its `build.rs` fetched and started a binary from a remote server [3]. SafeDep found that `arrayref` itself kept its familiar macro implementation, so the only meaningful change was that dependency entry, and Cargo builds declared non-optional dependencies even when the parent crate never calls them [4]. The typosquat also copied the real `proc-macro2` source, which kept dependent builds working while the build script ran in the background [5]. SafeDep classifies all versions of `proc-macro1` as a malicious typosquat and identifies 1.0.107 as the version carrying the downloader [21].
The build script reconstructed its server address from base64 fragments rather than putting a URL in plain sight, pulled an architecture-specific binary over TLS, and launched it detached from the build [6]. On Unix it wrote and ran `/tmp/rust-setup`; on Windows it created PowerShell and VBScript launchers in the temporary directory, started them hidden, and abandoned the child so the compiler did not wait [7].
The lure deserves attention because it inverts normal hygiene. The account controlling `arrayref` yanked versions 0.3.5 through 0.3.9 [8], five consecutive releases [23]. Cargo warns when a selected release has been yanked and suggests moving to one still available, and at the time that path pointed at 0.3.10 [10]. SafeDep quotes the reporter who encountered the package saying the warning is what led them there [11]. A developer only had to compile a project whose resolution selected the poisoned release [1].
Impersonation was cheap. The publishing account `dtolney` differs by one letter from `dtolnay`, the account used by Rust maintainer David Tolnay, and the package metadata falsely listed Tolnay as an author and pointed at a repository that did not exist under his GitHub account [18]. The evidence identifies Tolnay as the target, not a participant [20].
crates.io deleted `proc-macro1`, `proc-macro-en`, `aovine`, `arone`, `aronenao` and `tinymember`, removed the malicious `arrayref` version, and unyanked the maliciously yanked releases [12]. Two other crates from the same author, `internment` and `append-only-vec`, got the same treatment, and the account was locked [13]. The team does not believe the author acted maliciously and says their machine or credentials are likely compromised [14]. Nextron Systems GmbH's research team found it and reported it [24].
For checking: the deleted set is `append-only-vec@0.1.9`, `arrayref@0.3.10`, `internment@0.8.7`, plus any version of the six typosquats [15], three pinned versions and six whole crates [26]. The Rust blog publishes a `find` over `~/.cargo/registry/cache` for those `.crate` files [25]. SafeDep adds hashes for `proc-macro1` 1.0.106 and 1.0.107 and two network indicators, the defanged host `23[.]254[.]165[.]112` on ports 9089 and 443 [17]. Search build hosts for `/tmp/rust-setup`, `rust-setup.ps1` and `rust-setup-launch.vbs` [19]. A clean compile proves nothing, because the copied library code was designed to let builds succeed [22].
What is not known is the part that matters most: SafeDep's analysis establishes how the downloader executed but not what the second stage did after launch, or how many systems ran it [16]. Watch for the outcome of the attempt to contact the `arrayref` author [14], and for any accounting of second-stage behaviour. Until then, the yank warning is a signal to pin, not to upgrade.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence86
- Adoption15
- Hype gap+35
- Incentives60
- Confidence82
Perspective Coverage
7 publishers- Builder
- Builder 38%
- Operator
- Operator 54%
- Investor
- Investor 8%
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
SafeDep, co-founded by Abhisek Datta, reported on August 20, 2026 that a compromised release of the Rust crate arrayref downloaded and executed malware during compilation; a developer only had to compile a project whose dependency resolution selected the poisoned release.
- [2]
arrayref version 0.3.10 added a dependency on proc-macro1, a package impersonating the legitimate proc-macro2.
- [3]
Cargo automatically compiled the proc-macro1 dependency, which caused its build.rs script to fetch and launch a binary from a remote server.
- [4]
SafeDep found that arrayref retained its familiar macro implementation and that the important change was a single dependency entry in Cargo.toml; Cargo builds declared non-optional dependencies even when the parent crate never calls them.
- [5]
The malicious package copied the source code of the real proc-macro2, which kept dependent builds functioning normally while the added build script operated in the background.
- [6]
The proc-macro1 build script reconstructed its server address from base64 fragments, avoiding a plainly visible URL in the source, then fetched an architecture-specific binary over TLS and launched it detached from the build.
- [7]
On Unix the script writes and runs /tmp/rust-setup; on Windows it creates PowerShell and VBScript launchers in the temporary directory, starts them hidden and abandons the child process so the compiler does not wait for it.
- [8]
The account controlling arrayref yanked versions 0.3.5 through 0.3.9, according to SafeDep and the RustSec report.
- [9]
On 2026-08-20 at 7:15 UTC the Rust project received a report that the proc-macro1 crate was malicious; the Rust Security Response Team verified that the crate had a build script downloading a malicious payload.
- [10]
Cargo warns users when a selected release has been yanked and suggests moving to one that remains available; at the time, that path pointed toward arrayref 0.3.10.
- [11]
The reporter who encountered the package said the yank warning was what led to the poisoned release.
- [12]
The Rust project deleted proc-macro1, proc-macro-en, aovine, arone, aronenao and tinymember, removed the malicious arrayref version, and unyanked the maliciously yanked arrayref versions.
- [13]
Other crates by the same author, internment and append-only-vec, were also affected and given the same treatment, and the account was locked as a precaution.
- [14]
The Rust project does not believe the author of arrayref was acting maliciously, says their computer or credentials are likely compromised, and is attempting to contact them.
- [15]
The malicious versions deleted from crates.io were append-only-vec@0.1.9, arrayref@0.3.10, internment@0.8.7, and any versions of proc-macro1, proc-macro-en, aovine, arone, aronenao and tinymember.
- [16]
SafeDep's analysis establishes how the downloader executed but does not establish what the second-stage payload did after launch or how many systems ran it.
- [17]
SafeDep published file hashes for proc-macro1 versions 1.0.106 and 1.0.107 and two network indicators: the defanged host 23[.]254[.]165[.]112 on ports 9089 and 443.
- [18]
The dtolney publisher account differs by one letter from dtolnay, the account used by Rust maintainer David Tolnay; package metadata falsely listed Tolnay as an author and pointed to a nonexistent repository under his GitHub account.
- [19]
Build hosts should be checked for /tmp/rust-setup on Unix, rust-setup.ps1 and rust-setup-launch.vbs on Windows, and connections to the published network indicators.
- [20]
The available evidence identifies Tolnay as the impersonation target, with no indication that he participated in the publication.
- [21]
SafeDep's package table classifies all versions of proc-macro1 as a malicious typosquat and says the entire crate was removed; its technical analysis identifies version 1.0.107 as containing the downloader.
- [22]
A successful compilation does not clear the host; the copied library code was designed to let builds succeed.
- [23]
Versions 0.3.5 through 0.3.9 are five consecutive releases.
- [24]
The Rust blog credits the Research Team at Nextron Systems GmbH with initially discovering the attack and reporting it.
- [25]
The Rust blog publishes a find command over ~/.cargo/registry/cache to check locally for the named .crate files.
- [26]
The deletion list covers three specific pinned versions and six crates at any version.
Sources
6 independent publishers whose own reporting we read for this story.
- Supply chain attack on arrayref
blog.rust-lang.org
2 articles · August 21, 2026
- dev.toYour Cargo.lock Diff Is Also a Permission Diff
3 articles · August 22, 2026
- lwn.netSupply chain attack on arrayref (Rust blog)
1 article · August 20, 2026
- Compromised Rust crates on crates.io silently execute malware at build time - JFrog Security Research
research.jfrog.com
1 article · August 21, 2026
- runtimewire.comSafeDep says poisoned arrayref release ran malware during Rust builds
3 articles · August 22, 2026
- RUSTSEC-2026-0260: arrayref: `arrayref` 0.3.10 was removed from crates.io due to a malicious dependency › RustSec Advisory Database
rustsec.org
1 article · August 21, 2026
- socket.devPopular Rust Crates Compromised in Build-Time Supply Chain Attack
1 article · August 20, 2026
Topics and entities
Topics
- Software Supply Chain Security
- Package Typosquatting
- Rust build scripts
Entities
- JFrog
- Nextron Systems GmbH
- StepSecurity
- proc-macro1
- Cargo
- crates.io
- arrayref
- SafeDep
- Rust Security Response Team
- proc-macro2
- Socket
- Wiz