Back to Threat Intel
HighMonitoringThreat Advisory

Rust crates.io Supply-Chain Attack - How to Investigate Malware Builds

Rust crates.io supply-chain attack abused Cargo builds to execute malware. We explain affected crates, indicators, exposure checks, and response.

Cyberactics Security TeamAug 21, 20269 min read

CVE / NVD / KEV

No CVE, NVD, or CISA KEV identifier assigned for this advisory.

Vendor advisories

The Rust crates.io supply-chain attack used malicious Cargo build scripts to download and execute malware on developer and CI/CD systems.

A supply-chain attack against Rust's crates.io ecosystem turned the software compilation process into an execution path for malware on August 20, 2026. Malicious releases of the legitimate `arrayref`, `internment`, and `append-only-vec` crates introduced a dependency on `proc-macro1`, whose build script downloaded and launched a second-stage payload when Cargo built the affected dependency graph.

The Rust Security Response Team's incident advisory said it did not believe the `arrayref` author was acting maliciously and assessed that the maintainer's computer or credentials were likely compromised. crates.io removed the malicious releases, reversed malicious yanks of earlier releases, and locked the maintainer account as a precaution. The Rust team also deleted `proc-macro1` and related malicious crates. No responsible threat actor has been publicly attributed.

The short publication window reduced exposure but did not eliminate it. Potentially affected systems include developer workstations and CI/CD runners that resolved and built dependency graphs containing the malicious packages. Historical download counts for the legitimate crates do not indicate how many machines actually executed the payload.

Three legitimate crates introduced a malicious dependency

The incident is tracked across several RustSec advisories rather than a single CVE. The principal affected or malicious packages include:

The advisory distinctions are important. `RUSTSEC-2026-0262` applies specifically to `append-only-vec` 0.1.9. The compromised `arrayref` 0.3.10 release is tracked as `RUSTSEC-2026-0260`, while the malicious `proc-macro1` package has its own advisory, `RUSTSEC-2026-0265`.

The attack centered on `proc-macro1`, a name resembling the legitimate and widely used `proc-macro2` crate. Technical analysis by StepSecurity found that `arrayref` 0.3.10 introduced `proc-macro1` 1.0.107 as a dependency. The malicious behavior resided in the `proc-macro1` Cargo build script rather than the normal `arrayref` library code.

This design meant that application code did not need to import or invoke malicious functionality. Cargo builds declared dependencies and executes their build scripts as part of compilation, allowing the malicious code to run during the build process.

Cargo's build process became the execution vector

Cargo can execute a crate's `build.rs` script as part of compilation. In this incident, analysis of `proc-macro1` 1.0.107 found that its build script reconstructed attacker-controlled network addresses, downloaded a platform-specific second-stage payload, and launched it on the machine performing the build.

The analysis identified `23.254.165.112:9089` as the payload-delivery endpoint. The address `23.254.165.112:443` was passed to the subsequently executed payload as a command-line argument and assessed as its command-and-control address.

Observed file artifacts included:

  • On Unix-like systems, the downloaded executable was written to `/tmp/rust-setup`.
  • On Windows, the build script created `%TEMP%\rust-setup.ps1` and `%TEMP%\rust-setup-launch.vbs`.

Researchers found that the Windows execution sequence used a hidden launcher, while the Unix implementation detached the downloaded process from the build. The legitimate-looking library code could therefore continue compiling while the downloaded payload executed separately.

This behavior makes build history important when assessing exposure. Finding a malicious package in a cache establishes that the package reached an environment. Determining whether the second-stage payload actually executed requires build, process, filesystem, or network evidence.

The exposure window was short but significant

The Rust Security Response Team records `arrayref` 0.3.10 as published at 07:15:00 UTC on August 20 and deleted at 08:41:40 UTC, an exposure window of approximately 86 minutes. `internment` 0.8.7 was available for approximately 90 minutes, from 07:34:07 to 09:04:11 UTC. `append-only-vec` 0.1.9 was available for approximately 107 minutes, from 07:37:49 to 09:25:24 UTC.

Technical analysis places publication of malicious `proc-macro1` 1.0.107 at approximately 07:11 UTC and its removal at approximately 08:03 UTC.

RustSec confirms that all three compromised legitimate releases directly depended on `proc-macro1`, which executed the malicious build script. crates.io removed the affected versions and locked the legitimate maintainer account as a precaution.

Researchers also identified `proc-macro-en` as part of the same operation. RUSTSEC-2026-0264 states that it contained the same build script as `proc-macro1`. The crate was removed and its related account locked.

One technique increased the risk around `arrayref`: older legitimate releases from 0.3.5 through 0.3.9 were yanked as the malicious 0.3.10 version appeared. Technical analysis assessed that the yanks could encourage users encountering Cargo warnings about yanked versions to update. The Rust response subsequently unyanked the maliciously yanked releases.

Download counts do not equal victim counts

`arrayref` had accumulated roughly 245 million historical downloads around the time of the incident. That establishes a large dependency footprint, but it is not a count of compromised machines. RUSTSEC-2026-0260 subsequently reported that the malicious `arrayref` 0.3.10 release itself was downloaded 2,285 times before removal, while noting that most users remained on older versions through their lockfiles.

Even those 2,285 downloads should not be treated as confirmed host compromises. Malware execution depended on the malicious dependency being built and the second-stage retrieval succeeding. There is no verified public count of machines on which the downloaded second-stage payload successfully executed.

The same distinction applies to CI/CD exposure. A repository containing a historical dependency on a clean `arrayref` release is not evidence of host compromise. Evidence that an environment obtained and built `arrayref` 0.3.10, `internment` 0.8.7, `append-only-vec` 0.1.9, or malicious `proc-macro1` warrants deeper investigation.

What defenders should investigate

Organizations using Rust should search development endpoints, ephemeral build runners, persistent CI workers, and relevant cloud build infrastructure rather than limiting checks to production workloads.

Start by searching Cargo caches, `Cargo.lock` files, software composition records, and historical CI/CD build logs for `arrayref` 0.3.10, `internment` 0.8.7, `append-only-vec` 0.1.9, and `proc-macro1`. The Rust Security Response Team also identified `proc-macro-en`, `aovine`, `arone`, `aronenao`, and `tinymember` as malicious crates that were deleted and recommends checking local Cargo caches for any versions of those names.

For hosts that may have performed affected builds, defenders should correlate package evidence with:

  • Connections to `23.254.165.112`, particularly ports `9089` and `443`.
  • Creation or execution of `/tmp/rust-setup` on Unix-like systems.
  • Creation or execution of `%TEMP%\rust-setup.ps1` or `%TEMP%\rust-setup-launch.vbs` on Windows.
  • Unexpected child processes originating from Cargo or compilation workflows.
  • Outbound network traffic occurring during dependency compilation.
  • Subsequent suspicious access to credentials, CI tokens, signing material, or cloud credentials.

The network and filesystem indicators above come from technical analysis of the malicious build chain. They provide evidence that can help establish execution or attempted execution, but do not by themselves establish the capabilities of the downloaded second-stage malware.

Similarly, an old copy of a malicious `.crate` file in a Cargo cache establishes that the package was downloaded into that environment. Endpoint process, filesystem, build, and network telemetry is needed to determine whether it was subsequently built and whether payload retrieval or execution succeeded.

For long-term hardening of build and monitoring capabilities, see our guide to Managed Cybersecurity for GCC SMBs.

Confirmed payload execution requires host-level incident response

Where evidence shows that the malicious build script successfully retrieved and executed its second stage, incident response should extend beyond replacing the affected Rust dependency. The affected machine should be investigated as a compromised host. Credentials, tokens, keys, and other secrets accessible to that environment should be considered for rotation, and artifacts produced after compromise should be rebuilt from trusted environments.

This is particularly consequential for CI/CD runners, which may have access to repository credentials, package-publishing tokens, artifact-signing material, and cloud secrets. Credential rotation should be based on what was accessible from the affected host rather than indiscriminately rotating unrelated organizational credentials.

Artifacts generated on an affected build worker should also be assessed before continued distribution. A clean source repository by itself does not establish the integrity of artifacts produced after host compromise.

RustSec identifies versions through `arrayref` 0.3.9, `internment` 0.8.6, and `append-only-vec` 0.1.8 as unaffected by the respective malicious-release advisories. The malicious releases were removed from crates.io.

Attribution and second-stage capabilities remain unresolved

The available evidence supports a deliberate supply-chain attack and apparent misuse of a legitimate maintainer's publishing access. It does not establish who was responsible.

The Rust Security Response Team said it did not believe the `arrayref` author was acting maliciously and assessed that the maintainer's computer or credentials were likely compromised. That assessment does not establish which possibility occurred or the attacker's initial-access method.

The first-stage behavior is well established: the malicious `proc-macro1` build script was designed to download and execute another payload. Public technical analysis examined that delivery mechanism and its indicators, but the complete functionality and ultimate objective of the second stage have not been established in the evidence reviewed. Claims that it performed credential theft, persistence, lateral movement, or data exfiltration therefore remain unsupported.

For defenders, that uncertainty supports investigating confirmed second-stage execution as a host compromise rather than assuming that removing the malicious dependency fully remediates an affected system.

Build infrastructure needs endpoint-level visibility

The incident demonstrates that software build environments are security-sensitive execution environments. Monitoring only the resulting application can miss malicious activity occurring inside package-management and compilation workflows.

Relevant defensive controls include monitoring unexpected network connections from build processes, detecting unusual compiler and package-manager child processes, watching for executable or script creation in temporary directories, restricting CI/CD egress where operationally practical, and minimizing secrets available to individual build jobs.

For organizations using Cyberactics-managed monitoring and incident-response capabilities, the relevant focus is developer and CI/CD telemetry: correlating Cargo dependency evidence with process creation, outbound connections, temporary-file activity, and access to sensitive credentials to determine whether a malicious package progressed from dependency retrieval to payload execution and host compromise.

The malicious legitimate-crate releases were available for approximately 86 to 107 minutes on August 20, 2026, but their removal does not remove previously downloaded copies from local caches or undo execution that already occurred. Organizations that built Rust software during the exposure period should determine whether the affected releases entered their dependency graphs, identify the systems that built them, and investigate those systems using the published network and filesystem indicators.

#Rust crates.io supply-chain attack#crates.io malware#proc-macro1#Cargo build scripts#CI/CD security#Supply Chain
CY

Cyberactics Security Team

Managed Security Services

We help SMBs across Jordan, Saudi Arabia, Oman, and the UAE respond to active threats and validate exposure across their environments.

Need help responding?

Talk to an incident response engineer

Book a 30-minute call and we'll walk through exposure assessment, patch validation, and post-remediation investigation for your environment.