Skip to content

Build Widely confirmed6 publishers 3 min read Published Updated

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

Send a correction

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%
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [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.

    Reported SupportedView cited source
  2. [2]

    arrayref version 0.3.10 added a dependency on proc-macro1, a package impersonating the legitimate proc-macro2.

    Reported SupportedView cited source
  3. [3]

    Cargo automatically compiled the proc-macro1 dependency, which caused its build.rs script to fetch and launch a binary from a remote server.

    Reported SupportedView cited source
  4. [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.

    Reported SupportedView cited source
  5. [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.

    Reported SupportedView cited source
  6. [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.

    Reported SupportedView cited source
  7. [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.

    Reported SupportedView cited source
  8. [8]

    The account controlling arrayref yanked versions 0.3.5 through 0.3.9, according to SafeDep and the RustSec report.

    Reported SupportedView cited source
  9. [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.

    Reported SupportedView cited source
  10. [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.

    Reported SupportedView cited source
  11. [11]

    The reporter who encountered the package said the yank warning was what led to the poisoned release.

    Reported Supported Source: SafeDep, quoting the reporterView cited source
  12. [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.

    Reported SupportedView cited source
  13. [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.

    Reported SupportedView cited source
  14. [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.

    Reported SupportedView cited source
  15. [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.

    Reported SupportedView cited source
  16. [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.

    Reported SupportedView cited source
  17. [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.

    Reported SupportedView cited source
  18. [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.

    Reported SupportedView cited source
  19. [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.

    Reported SupportedView cited source
  20. [20]

    The available evidence identifies Tolnay as the impersonation target, with no indication that he participated in the publication.

    Reported SupportedView cited source
  21. [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.

    Reported SupportedView cited source
  22. [22]

    A successful compilation does not clear the host; the copied library code was designed to let builds succeed.

    Reported SupportedView cited source
  23. [23]

    Versions 0.3.5 through 0.3.9 are five consecutive releases.

    Derived Supported
  24. [24]

    The Rust blog credits the Research Team at Nextron Systems GmbH with initially discovering the attack and reporting it.

    Reported SupportedView cited source
  25. [25]

    The Rust blog publishes a find command over ~/.cargo/registry/cache to check locally for the named .crate files.

    Reported SupportedView cited source
  26. [26]

    The deletion list covers three specific pinned versions and six crates at any version.

    Derived Supported

Sources

6 independent publishers whose own reporting we read for this story.

  1. blog.rust-lang.org

    2 articles · August 21, 2026

    Supply chain attack on arrayref
  2. dev.to

    3 articles · August 22, 2026

    Your Cargo.lock Diff Is Also a Permission Diff
  3. lwn.net

    1 article · August 20, 2026

    Supply chain attack on arrayref (Rust blog)
  4. research.jfrog.com

    1 article · August 21, 2026

    Compromised Rust crates on crates.io silently execute malware at build time - JFrog Security Research
  5. runtimewire.com

    3 articles · August 22, 2026

    SafeDep says poisoned arrayref release ran malware during Rust builds
  6. rustsec.org

    1 article · August 21, 2026

    RUSTSEC-2026-0260: arrayref: `arrayref` 0.3.10 was removed from crates.io due to a malicious dependency › RustSec Advisory Database
  7. socket.dev

    1 article · August 20, 2026

    Popular Rust Crates Compromised in Build-Time Supply Chain Attack

Topics and entities

Entities