Malicious Rust Crate Releases Added a Build-Time Payload Through a Typosquatted Dependency

· Original article ↗

Summary

Three malicious Rust crate releases added a typosquatted dependency whose build script downloaded and ran a payload during compilation. The releases were removed within 86–107 minutes; RustSec reported no evidence they were used.

Key points

  • A compromised maintainer account published malicious releases of arrayref 0.3.10, internment 0.8.7, and append-only-vec 0.1.9 on August 20, 2026; all were removed within 86–107 minutes.
  • The releases added proc-macro1, a typosquat of proc-macro2. Its build script could run during compilation without code from the affected crates being called.
  • The script selected a payload for the operating system and CPU architecture, disabled TLS certificate validation, and launched the payload; analysis says builds, checks, and tests could trigger it.
  • The implant reportedly supports C2 communication and persistence on Windows, macOS, and Linux. Wiz said it steals browser credentials; Nextron's analyzed Windows payload queried usernames and origins but did not directly extract password values. Linux and macOS payloads were not analyzed.
  • The Rust Security Response Team said the maintainer's computer or credentials were likely compromised; how the account was compromised and any responsible actor remain unknown.
  • RustSec advisories reported no evidence that the malicious versions were used. No CVE was assigned, and developers were advised to inspect their Cargo cache and pin arrayref to 0.3.9 or earlier.

Article Details

Attack Vectors
  • A compromised maintainer account published affected crate releases with a typosquatted proc-macro1 dependency. Resolving and building the dependency was enough to run its build script; the affected crate's functions did not need to be called.
  • The build script assembled the payload host and C2 address from base64 fragments, selected a payload by operating system and CPU architecture, and downloaded and launched it.
  • On Windows, the payload was launched through a hidden PowerShell script and VBScript launcher. On Unix and macOS, it was written to /tmp/rust-setup and launched detached.
  • According to the article's account of Wiz's findings, the stage-2 implant beaconed over HTTPS POST and supported commands for termination, C2 reconfiguration, persistence installation, and downloading and running further scripts.
Defensive Notes
  • The Rust Security Response Team advised developers to inspect ~/.cargo/registry/cache for the deleted crate files and pin arrayref to 0.3.9 or earlier.
  • The Rust Security Response Team unyanked the maliciously yanked versions during its response. The article reports no patched version and no CVE assignment.
  • RustSec advisories for the affected crates recorded no evidence that the malicious versions were used; the article does not establish that they were used in builds.

Indicators of compromise

TypeIndicatorContext
EMAILrchaitm@gmail[.]comListed as forged author metadata associated with the malicious crate activity.
HOSTNAMEhwsrv-798836[.]hostwindsdns[.]comListed by StepSecurity among indicators for the incident's network infrastructure.
IPV423[.]254[.]165[.]112Listed by StepSecurity as the payload host on port 9089 and C2 on port 443.

MITRE ATT&CK

People

Products

Tools

Related Articles