Cybersecurity

Rust Package Hack Plants Information-Stealing Malware on Developers’ Devices

Rust package maintainer accounts were compromised, resulting in the publication of malicious versions of arrayref and two other packages and the execution of malware during the build process. The malware targeted system data and browser credentials, and developers who used the affected versions during the exposure window are advised to rebuild their environments and rotate secrets.

2026-08-20
4 min read
175 views
certi.news Editorial Team
Rust Package Hack Plants Information-Stealing Malware on Developers’ Devices

Attackers exploited a maintainer account associated with the popular Rust package arrayref to publish a malicious version that runs malware on developers’ devices while projects are being built. During a time window of no more than 23 minutes, the operation also affected the append-only-vec and internment packages in a software supply chain attack.

StepSecurity reported that the affected versions were arrayref 0.3.10, append-only-vec 0.1.9, and internment 0.8.7, with all three packages managed by the same account. arrayref is widely used, recording more than 53 million downloads in the last 90 days and more than 245 million downloads in total. It is included in projects and tools related to cryptography, graphics, and Rust graphical interfaces, as well as components used in the Ethereum and Solana ecosystems.

How Was the Attack Carried Out?

The attackers added a dependency on a package named proc-macro1, which impersonates the well-known proc-macro2 package. Most of the original package source remained unchanged, making the tampering more difficult to detect for those who review only software diffs.

proc-macro1 contained a build.rs file that runs automatically during compilation. The file reconstructs components of the malicious payload from Base64-encoded parts, then selects an operating-system-specific payload, including Linux, Windows, and macOS on x86-64 and ARM64 architectures. On Unix, the payload is written to /tmp/rust-setup and run as a separate process, while on Windows the attack creates a file named rust-setup.ps1 inside the TEMP directory and uses wscript.exe and a VBS script to keep the process running.

What Can the Malware Steal?

According to Wiz’s analysis, the second stage collects host information and credentials. The malware extracts login data from the SQLite databases of Google Chrome, Brave, and Edge browsers. It also establishes persistence through Registry Run on Windows, LaunchAgent on macOS, and systemd on Linux. The payload receives an address as an argument, which is believed to be the address of a command-and-control server.

Timeline and What It Means for Developers

The campaign began at 01:17 UTC on August 20, 2026, with the creation of a GitHub account impersonating prominent Rust developer David Tolnay, followed by a similar account on crates.io. A clean version of proc-macro1 was published at 01:55, followed by the malicious version 1.0.107 at 07:11. Four minutes later, arrayref 0.3.10 was published through the legitimate droundy account associated with David Roundy, while versions 0.3.5 through 0.3.9 were removed, potentially causing installation tools to select the malicious version.

The incident was reported at 07:54, and crates.io deleted the proc-macro1 package at 08:03 and removed arrayref 0.3.10 from the index at 08:41. Malicious versions of other packages— aovine, arone, aronenao, and tinymember—were also removed.

Response Steps

Anyone who installed the affected versions during the exposure window, which lasted nearly an hour and a half, should treat the environment as compromised. The review should include searching Cargo.lock files for suspicious versions, checking for dropped files, and inspecting connections to 23.254.165[.]112 over ports 9089 and 443. If a compromise is confirmed, the analyses recommend rotating all credentials, CI tokens, signing keys, and other secrets, then rebuilding the environment from trusted backups. Unaffected projects should pin a version known to be safe until the status of the maintainer accounts becomes clear.

News source
BleepingComputer
Open original source ↗
c
Author

certi.news Editorial Team

What you need to know

Compromised maintainer accounts were used to publish malicious versions of Rust packages, including arrayref, append-only-vec, and internment, causing information-stealing malware to run while projects were being built. Anyone who used the affected versions during the exposure window should inspect their environment, rotate secrets and credentials, and rebuild from trusted sources if a compromise is confirmed.

  • The affected versions mentioned are arrayref 0.3.10, append-only-vec 0.1.9, and internment 0.8.7.
  • A fake dependency named proc-macro1, impersonating proc-macro2, was added and contained a build.rs file that executed automatically during compilation.
  • The payload targeted Linux, Windows, and macOS on x86-64 and ARM64 architectures, collecting system information and credentials from Chrome, Brave, and Edge browsers.
  • The malware established persistence using Registry Run on Windows, LaunchAgent on macOS, and systemd on Linux.
  • The analysis recommends reviewing Cargo.lock files, checking for suspicious files and connections, rotating CI tokens, signing keys, and secrets, and then rebuilding affected environments.
  • crates.io removed the mentioned malicious packages and versions after the incident was reported.

FAQ

Which packages were affected?

The article mentioned arrayref 0.3.10, append-only-vec 0.1.9, and internment 0.8.7. It also noted the removal of malicious versions of other packages: aovine, arone, aronenao, and tinymember.

How did the malware operate?

The payload components were reconstructed from Base64-encoded fragments inside build.rs, after which a payload appropriate for the operating system was selected and executed during the build process.

What data did the malware target?

It collected host information and browser credentials, including SQLite databases from Google Chrome, Brave, and Edge.

What should developers who used the affected versions do?

They should treat the environment as compromised, review Cargo.lock files and suspicious files and connections, rotate credentials and secrets, and rebuild the environment from trusted backups.

In the same category

You may also like

View all news