Hijacked Rust crates ran malicious code during the build
The Rust Security Response Team was notified by Nextron Systems on 20 August 2026 that the crate proc-macro1 contained a build script downloading a malicious payload. The investigation showed that three established crates had been republished with that crate as a dependency, namely arrayref 0.3.10, internment 0.8.7 and append-only-vec 0.1.9. The versions were live for 86, 90 and 107 minutes respectively before removal. The Rust team deleted the malicious crates, restored safe versions and locked the maintainer account because the computer or the credentials were likely compromised. The team states there is no suspicion that the maintainer acted deliberately.
What happens technically
The attack exploits a property of the build system, not a vulnerability in the code. Rust crates may carry a build script in the file build.rs, and that script runs automatically when the crate is built. A developer therefore does not need to call anything from the malicious crate. It is enough that it sits in the dependency tree and that the project compiles. The name proc-macro1 is moreover chosen to resemble the very widely used library proc-macro2, so that it does not stand out in a dependency list.
Wiz has described the payload in more detail. The build script assembles the address of the command server from split and encoded fragments, and downloads a build suited to Linux, Windows or macOS. The second stage is a backdoor that beacons to the command server over HTTPS, collects hostname, username, operating system details and installed applications, and goes through browser profiles for Chrome, Brave and Edge to map which sites the user has stored logins for. Wiz notes that the passwords themselves are not retrieved. The backdoor persists through run keys on Windows, a LaunchAgent on macOS or systemd services on Linux, and it accepts commands to change configuration, run scripts or shut itself down. Wiz points to three areas of overlap with operations others have linked to North Korea, among them the same endpoint on the command server and a shared certificate issuer, but describes this as substantial overlap rather than an attribution of its own. Socket states that its own scanning found proc-macro1 independently the same morning, and that the previous clean release of arrayref has around 152 million downloads.
What this means for you if you run the build environment
The short window is no comfort here, and that is precisely the point. A build server that ran a dependency update during those ninety minutes may have executed the backdoor with no human involved. The build environment is at the same time the place in the organisation with the most secrets gathered in one spot, meaning signing keys, cloud access and repository tokens. Malware on a developer laptop is bad, while malware on the build server is an attack on everything you ship onwards.
This case is also a test of whether you can answer a simple question: which dependencies were pulled into your builds on 20 August. Organisations with locked dependency files and their own mirror of the package registry answer in minutes. Those building straight against the public registry without locking have to go looking. For organisations covered by NIS2 this is supply chain security under Article 21, and for most it is the least documented part of the chain. Our assessment is that the measure with the best effect per krone is locking dependencies and separating the build environment from production secrets, rather than hunting for these particular package names.
Berigo recommends
- Search build logs and local caches for proc-macro1 and the three affected versions, paying particular attention to builds run on 20 August 2026.
- Treat build servers that ran those versions as compromised, and rotate the keys, tokens and cloud access they could reach.
- Lock dependencies with lockfiles, and build against an internal mirror rather than straight against the public registry.
- Separate the build environment from production secrets, so that a build cannot reach more than it needs.
- Require software suppliers to answer which dependencies went into a given release, and ask for a component inventory.
Security that is understood, governed and works.
Let us help you turn security into an advantage, not a cost. Get in touch for a no-obligation conversation about where your organisation stands and what to prioritise first.
Get in touch