{"id":1956,"date":"2026-08-21T07:23:21","date_gmt":"2026-08-21T00:23:21","guid":{"rendered":"https:\/\/vncybers.vn\/canh-bao-crates-io-ba-crate-rust-bi-chen-ma-doc-khi-bien-dich\/"},"modified":"2026-08-22T14:11:00","modified_gmt":"2026-08-22T07:11:00","slug":"crates-io-rust-crates-malware-compilation-supply-chain-alert-2","status":"publish","type":"post","link":"https:\/\/vncybers.vn\/en\/canh-bao-crates-io-ba-crate-rust-bi-chen-ma-doc-khi-bien-dich\/","title":{"rendered":"crates.io Alert: Three Rust Crates Injected Malware That Runs During Compilation"},"content":{"rendered":"<p>A new supply-chain incident in the Rust ecosystem is drawing attention from software developers after the Rust Project removed malicious versions of three popular crates from crates.io. According to The Hacker News, the affected releases were <strong>arrayref 0.3.10<\/strong>, <strong>internment 0.8.7<\/strong> and <strong>append-only-vec 0.1.9<\/strong>, all published from the same owner account on August 20, 2026.<\/p>\n<p>The notable point is that the malware did not require an application to directly call any function from those crates. The payload was triggered through the build script of a fake dependency named <strong>proc-macro1<\/strong>, a typosquat intended to resemble <strong>proc-macro2<\/strong>. As a result, merely resolving and building an infected dependency could execute malicious code in a developer's environment.<\/p>\n<h2>Short-lived malicious releases, serious risk<\/h2>\n<p>The Hacker News cited information from the Rust Security Response Team saying the malicious releases were removed within roughly 86 to 107 minutes of appearing. Specifically, <strong>arrayref 0.3.10<\/strong> was available for about 86 minutes, <strong>internment 0.8.7<\/strong> for about 90 minutes and <strong>append-only-vec 0.1.9<\/strong> for about 107 minutes.<\/p>\n<p>Even though the exposure window was short, the concern lies in where these packages sit in dependency chains. <strong>arrayref<\/strong> alone was reported by The Hacker News to have more than 245 million all-time downloads and over 53 million downloads in the 90 days leading up to August 20. Some dependency chains may have accepted version <strong>0.3.10<\/strong> because of caret ranges in semver configuration.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/vncybers.vn\/wp-content\/uploads\/2026\/08\/rust-crates-inline.jpg\" alt=\"Source code and software build workflow in the crates.io supply-chain incident\" style=\"max-width: 100%; height: auto;\" \/><\/p>\n<h2>How the malware was triggered<\/h2>\n<p>According to published analysis, each infected release added only one dependency to its manifest. That dependency looked like a legitimate library so the build could complete normally, but its build script reconstructed the payload and command-and-control address from base64 fragments, disabled TLS validation through a custom certificate verifier, then selected the payload based on the operating system and CPU architecture.<\/p>\n<p>On Unix and macOS, the payload was written to <strong>\/tmp\/rust-setup<\/strong>, marked executable and launched separately from the build process. On Windows, the malware wrote a PowerShell script to a temporary directory, then started it hidden through VBScript and <strong>wscript.exe<\/strong>. Analysis summarized by The Hacker News also mentioned persistence through a Registry Run key on Windows, LaunchAgent on macOS and a systemd user service on Linux.<\/p>\n<h2>Recommendations for developers<\/h2>\n<p>Rust developers should inspect the <strong>~\/.cargo\/registry\/cache<\/strong> directory for removed crate files, especially on systems that built projects during the incident window. For projects depending on <strong>arrayref<\/strong>, the current recommendation is to pin to <strong>0.3.9<\/strong> or earlier, according to guidance from the Rust Security Response Team cited by The Hacker News.<\/p>\n<p>Engineering teams should also review build logs and look for unusual outbound connections to unfamiliar infrastructure, especially network indicators shared by the community during analysis. If the build happened on a personal workstation, the incident should be treated as serious because the payload ran in an environment that may have access to source code, tokens, SSH keys or browser credentials.<\/p>\n<h2>Lessons from the incident<\/h2>\n<p>This case reinforces that software supply chains can be attacked not only at runtime, but also during the build process itself. In fast-moving ecosystems, a malicious package that exists for less than two hours can still have significant impact if it lands in a popular dependency or is automatically pulled by CI systems.<\/p>\n<p>For enterprises, controls around newly released dependencies, version pinning, provenance checks and isolation of build environments should be treated as basic operational requirements. Automated package update tools should include a safety delay before accepting new versions, especially for libraries that sit deep inside dependency chains.<\/p>\n<p style=\"text-align: right; margin-top: 40px;\"><em><strong>VNCyberS<\/strong> compiled from The Hacker News, BleepingComputer and Rust Security Response Team<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>M\u1ed9t s\u1ef1 c\u1ed1 chu\u1ed7i cung \u1ee9ng m\u1edbi trong h\u1ec7 sinh th\u00e1i Rust \u0111ang thu h\u00fat s\u1ef1 ch\u00fa \u00fd c\u1ee7a c\u1ed9ng \u0111\u1ed3ng ph\u00e1t tri\u1ec3n ph\u1ea7n m\u1ec1m sau khi Rust Project g\u1ee1 b\u1ecf c\u00e1c phi\u00ean b\u1ea3n \u0111\u1ed9c h\u1ea1i c\u1ee7a ba crate ph\u1ed5 bi\u1ebfn tr\u00ean crates.io. Theo The Hacker News, c\u00e1c phi\u00ean b\u1ea3n b\u1ecb \u1ea3nh h\u01b0\u1edfng g\u1ed3m arrayref [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1954,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[665,667,566,664,86,666,663,668,483,114],"class_list":["post-1956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tin-tuc","tag-arrayref","tag-cargo","tag-chuoi-cung-ung-phan-mem","tag-crates-io","tag-malware","tag-proc-macro1","tag-rust","tag-rust-security-response-team","tag-supply-chain-attack","tag-vncybers"],"_links":{"self":[{"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/posts\/1956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/comments?post=1956"}],"version-history":[{"count":2,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/posts\/1956\/revisions"}],"predecessor-version":[{"id":1958,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/posts\/1956\/revisions\/1958"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/media\/1954"}],"wp:attachment":[{"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/media?parent=1956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/categories?post=1956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vncybers.vn\/en\/wp-json\/wp\/v2\/tags?post=1956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}