Cyber Security News

Popular Rust Packages With 244M Downloads Compromised to Run Malware

A major supply chain attack targeting the Rust ecosystem, in which two widely used crates, arrayref and append-only-vec, were hijacked to silently deliver malware the moment developers compiled their projects.

Together, the two packages account for hundreds of millions of downloads, making this one of the largest Rust crate compromises ever recorded by download volume.

Researchers at Aikido Security first spotted a new, suspicious package called proc-macro1 quietly downloading and executing a remote file during its build process.

The name was a deliberate typosquat of proc-macro2, one of the most heavily relied-upon crates in the Rust world, and it copied the legitimate crate’s description and documentation to appear trustworthy.

Within the same hour, arrayref and append-only-vec, both maintained by the same developer, suddenly added proc-macro1 as a dependency, transforming an isolated typosquat into a full-blown supply chain incident.

The compromise itself was disguised in a single injected line inside each crate’s manifest file, pointing to proc-macro1 version 1.0.107.

Crucially, the visible source code of arrayref and append-only-vec remained untouched and legitimate, so a manual code review would not have raised alarms.

The real danger was buried inside proc-macro1‘s build.rs script, a file that Cargo automatically compiles and runs during every build, meaning developers never had to call any function from the compromised crates to get infected.

The technique highlights how threat actors exploit build configurations, echoing risks seen in compromised developer tooling across open-source ecosystems.

Once triggered, the build script downloaded a platform-specific binary for Linux, Windows, or macOS from a remote server identified by a bare IP address, obfuscating the destination using base64-encoded fragments to dodge string-based scanners

On Unix and macOS systems, the malware wrote the payload to disk, marked it as executable, and launched it as a detached background process so it would keep running even after the build finished, according to the Aikido Security report.

Analysis of the recovered binaries revealed an infostealer capable of harvesting saved credentials from Chromium-based browsers such as Chrome, Brave, and Edge, along with data from browser extension storage, a location frequently used by cryptocurrency wallet extensions. This functional overlap mirrors capabilities found in dedicated credential stealer malware designed for rapid host enumeration.

The malware also established persistence on macOS through a LaunchAgent configured to relaunch itself at every login, and it maintained contact with a command-and-control server capable of issuing remote shell commands. The stealth of the operation stemmed from abusing standard package build automation rather than modifying visible application logic.

Compromise MetricTechnical SpecificationOperational Impact
Compromised Cratesarrayref (v0.3.10), append-only-vec (v0.1.9), internment (v0.8.7)High-volume supply chain exposure
Injected Dependencyproc-macro1 (v1.0.107)Typosquat of legitimate proc-macro2
Execution TriggerAutomated execution via Cargo build.rsArbitrary code execution during compilation
Payload ClassificationCross-platform Infostealer & Remote ShellBrowser credential and wallet key extraction
macOS PersistenceBackground LaunchAgent configurationSurvives process exit and system reboot
Incident Duration2-hour window on August 20, 2026Fast-tracked crate yank and account isolation

The Rust Security Response Team confirmed the malicious build script after receiving a tip from researchers at Nextron Systems and moved to delete proc-macro1 along with related lookalike packages including proc-macro-en, aovine, arone, aronenao, and tinymember.

The team also removed the tainted versions, arrayref 0.3.10, append-only-vec 0.1.9, and internment 0.8.7, and locked the compromised maintainer’s account as a precaution, noting the account holder appeared to be a victim of stolen credentials rather than a malicious insider.

The affected maintainer is Andrew Gallant, known in the community as BurntSushi and the creator of the popular ripgrep tool. Reports indicate the entire malicious campaign, from the first tainted publish to remediation, played out within roughly a two-hour window on August 20, 2026.

Teams that built Rust projects during the incident window should treat their CI pipelines and local build caches as potentially compromised and inspect the Cargo registry cache for the malicious crate files.

Pinning arrayref below version 0.3.10, auditing recent build logs, and enabling two-factor authentication on crates.io publishing accounts are recommended immediate steps.

Maintaining rigorous patch management across all build environments ensures automated pipelines remain defended against rogue dependencies.

The incident underscores a persistent weakness in package ecosystems: build-time scripts can execute arbitrary code with full user privileges long before any application logic runs, making verification of dependency trust just as critical as source code review.

Prevent incidents due to slow investigations. Power your Tier 1 with threat intelligence from 15K SOCs: Integrate TI Lookup in your SOC

Guru Baran

Gurubaran KS is a cybersecurity analyst, and Journalist with a strong focus on emerging threats and digital defense strategies. He is the Co-Founder and Editor-in-Chief of Cyber Security News, where he leads editorial coverage on global cybersecurity developments.

Recent Posts

Hackers Target AI Infrastructure With RCE, Prompt Injection and API Key Theft

Hackers are actively probing AI systems, turning exposed gateways and agent tools into routes for…

3 hours ago

Hackers Make Phishing Pages Change Their Code Every Time Someone Opens Them

Hackers are making some phishing pages harder to track by changing the code delivered to…

3 hours ago

Iran-Linked Hackers Reportedly Knock UK Power Plant Offline for Four Days

A cyber incident reportedly forced a British power plant to halt operations for about four…

4 hours ago

Russian Hackers Use New HOOKEDGE Malware to Spy on European Defense and Diplomatic Targets

Russian hackers have used a new backdoor called HOOKEDGE to target defense manufacturers, government bodies,…

4 hours ago

Ransomware Gang Claims AI Can Analyze 700GB of Stolen Data Every Hour

TITAN ransomware is pairing file encryption with an ambitious claim: artificial intelligence that can sort…

4 hours ago

Hackers Compromise Hundreds of WordPress Sites to Deploy Amatera Stealer via ClickFix

A fake student resume is being used to place a remote-access tool on researchers’ Windows…

6 hours ago