Skip to content

WebRonaq Video

How Rust build.rs Ran Malware at Compile Time

25 August 20265m 57s

Open on YouTube ↗

Share this page

How Rust build.rs Ran Malware at Compile Time — WebRonaq

About this video

Rust cargo build script execute code at compile time: how attackers hijacked trusted crates on August 20, 2026 and ran malware the moment developers typed cargo build.

On August 20, 2026, three widely used Rust crates, arrayref, internment, and append-only-vec, were compromised and quietly pulled in a typosquatted package called proc-macro1. Its build.rs file reassembled a remote server address from scrambled fragments, disabled certificate checks, and downloaded a second-stage binary, all before a single line of application code ran. This video breaks down exactly how Rust compile-time code execution works, why the Cargo dependency resolver surfaced the malicious version, and what concrete steps you can take to harden your Rust supply chain against cargo build script attacks and crates.io typosquatting.

In this video

  • What build.rs does and why Cargo runs it before your own code
  • How yanking old versions forced fresh resolves to pick the malicious release
  • How proc-macro1 typosquatted proc-macro2 and hid malware inside the build script
  • Why cargo-audit, cargo-deny, and cargo-vet could not catch a brand-new unknown crate
  • A concrete hardening checklist: lock files, two-factor authentication, CI policy enforcement, and incident response

More every week on WebRonaq on YouTube.

More videos

All videos

Discover more

Keep learning on WebRonaq