← Lab /Security & privacy

Malicious arrayref Rust crate used in supply chain attack linked to DPRK campaigns

The compromised arrayref crate was part of a supply chain attack that shares infrastructure with North Korean (DPRK) operations.

Security & privacy Wiz Research 20 Aug 2026 Disclosure Real-world evidence

Published as “Rust Supply Chain Attack on arrayref: Significant Overlap with DPRK Campaigns”

Why it matters

The attack shows that Rust build scripts can be abused for supply-chain compromise, underscoring the need for stricter vetting of build-time dependencies.

Summary

The researchers discovered malicious versions of three Rust crates, including arrayref, published to crates.io that add a typosquatted build-time dependency (proc-macro1). The build script reconstructs a C2 URL, disables TLS verification, downloads a platform-specific payload and executes it during compilation. They observed that arrayref is present in over 35% of all environments and 75% of Rust environments, and that the C2 infrastructure overlaps with the DPRK-attributed Mastra campaign. Evidence is based on real-world crate releases and analysis of the malicious build.rs code.

What they found 2

  1. arrayref crate is present in a large fraction of Rust deployments

    “arrayref can be found in over 35% of all environments. Even more notably, it's used in 3⁄4 of all environments where Rust is present.”

  2. malicious build script downloads and runs a remote binary while disabling TLS verification

    “Reconstructs a C2 URL from Base64 fragments (e.g. https://23.254.165[.]112:9089/) Disables TLS certificate validation via a custom AcceptAll verifier Downloads a platform-specific payload based on OS and architecture Writes it to /tmp/rust-setup (Unix) or %TEMP%\rust-setup.ps1 (Windows) Executes the payload, passing the C2 beacon address as an argument”

Caveats 2

  • Edit: A prior version of this piece mistakenly stated that browser credentials were stolen. The queries only enumerate saved logins, they do not retrieve the encrypted credential material.
  • Currently, the relevant domains do not appear to be registered.

What’s new here 4

  • First documented supply-chain compromise of Rust crates via malicious build scripts.
  • Identification of three malicious crate versions, with arrayref being the most widely used.
  • Demonstrated infrastructure overlap with North Korean Mastra and axios campaigns.
  • Provided concrete remediation steps for compromised developer workstations and CI pipelines.