Rust Supply-Chain Attack: arrayref 0.3.10 and the proc-macro1 Typosquat Execute a Remote Payload at Build Time
A Rust supply-chain attack involved a malicious version of the arrayref crate (0.3.10) and a typosquatted proc-macro1 package that executed remote payloads at build time. The attack leveraged build-time code execution to compromise projects during compilation.
- Disclosed
- Last updated
- Blast radius
- Build-time execution affecting all projects that depend on the malicious versions during compilation
- Ecosystems
- Attack vectors
- Affected entities
- arrayref · 0.3.10
- proc-macro1Typosquat of proc-macro2
A supply-chain attack targeting the Rust ecosystem involved the arrayref crate version 0.3.10 and a typosquatted package named proc-macro1 (a misspelling of the legitimate proc-macro2 crate). The malicious packages were designed to execute remote payloads during the build process, allowing attackers to compromise projects at compile time rather than runtime.
The attack combined two vectors: a compromised or malicious version of arrayref and a typosquatting attack using a similarly-named package. By executing code during the build phase, the attacker could potentially steal credentials, inject backdoors, or exfiltrate sensitive data from the build environment.
This incident demonstrates the risk of supply-chain attacks in compiled languages where build-time dependencies can execute arbitrary code. Projects that included these packages in their dependency trees during the affected period were at risk of compromise.
Indicators of compromise
- Packages
- arrayref
- proc-macro1
Remediation
- Audit all projects for dependencies on arrayref 0.3.10 and proc-macro1; remove or update to safe versions immediately
- Review build logs and environment variables for signs of unauthorized access or data exfiltration during the affected period
- Rotate any credentials or secrets that may have been exposed in the build environment
- Implement dependency pinning and lock file verification to prevent unexpected package updates
- Use supply-chain security tools to detect typosquatted or suspicious package names in dependency trees
- Enable build-time sandboxing or restrict network access during the build process where possible
Sources
Cite this entry
"Rust Supply-Chain Attack: arrayref 0.3.10 and the proc-macro1 Typosquat Execute a Remote Payload at Build Time." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 20, 2026; last updated August 20, 2026. https://supplychainattack.org/incident/rust-supply-chain-attack-arrayref-0-3-10-and-the-proc-macro1-typosquat-execute-a-wl7ika
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in proc_macro_en (crates.io)
proc-macro-en is a malicious Rust crate published to crates.io on 2026-08-20 as part of a coordinated build-time payload campaign. The crate contained a build script that downloads and executes a remote binary from 23.254.165.112:9089 with command and control at 23.254.165.112:443. All versions have been removed from crates.io.
CargoCompromised packageTyposquatting - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - containedcritical
Malicious code in chai-as-testkit (npm)
The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.
npmTyposquattingCompromised package - containedcritical
Malicious code in mlflow-otel-instrumentor (PyPI)
A typosquatting package named mlflow-otel-instrumentor was published to PyPI containing malicious code that downloads and executes a remote executable during installation. The payload exhibits worm-like behavior with intentions for persistence via systemd, cryptocurrency mining, and network propagation.
PyPITyposquattingCompromised package