<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl" -->

---
title: Fixing Rust's supply chain security: The good, the bad...
description: An opinion piece analyzing the recent Rust supply chain attack that compromised 9 packages downloaded over 1 million times per day, removed within ~110 minutes...
canonical: https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fixing Rust's supply chain security: The good, the bad and the ugly | daily.dev
og:description: An opinion piece analyzing the recent Rust supply chain attack that compromised 9 packages downloaded over 1 million times per day, removed within ~110 minutes...
og:url: https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl
og:image: https://api.daily.dev/og/posts/kBizyr3BL.png
og:image:alt: Fixing Rust's supply chain security: The good, the bad and the ugly
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fixing Rust's supply chain security: The good, the bad and the ugly

**[Sylvain Kerkour](https://daily.dev/sources/kerkour)** · 14 min read · 0 upvotes · 0 comments

## Summary

An opinion piece analyzing the recent Rust supply chain attack that compromised 9 packages downloaded over 1 million times per day, removed within ~110 minutes by the Rust Security Response Team. The author argues Rust's small standard library and centralized crates.io registry mirror JavaScript's insecure-by-design dependency model, citing research that 17% of top crates' published code doesn't match their source repos. Proposes Go's model (comprehensive standard library, decentralized source-based imports, checksum database) as the gold standard, and offers interim mitigations: Dev Containers, password managers for SSH keys, CI-only publishing, pinning dependencies to git sources via [patch.crates-io], and tools like cargo-audit and cargo-vet. The author also promotes their own extended standard library project, stdx, and shares patterns like using smallvec to avoid allocations across embedded and server contexts.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://kerkour.com/fixing-rust-supply-chain-security>

## Questions this post answers

### What happened in the recent Rust supply chain attack on crates.io packages?

Nine backdoored Rust packages, collectively downloaded more than 1,000,000 times per day, were published to crates.io in a supply chain attack. The Rust Security Response Team removed the malicious packages within roughly 110 minutes of the attack being detected, limiting the impact, though the underlying vulnerabilities in the package ecosystem remain unaddressed.

_Rust developers tightening dependency hygiene after supply chain incidents can follow ongoing coverage on daily.dev._

### How can I stop Cargo from fetching a dependency from crates.io and pull it directly from its git repository instead?

Use the [patch.crates-io] section in Cargo.toml to override a dependency's source with its git repository and a pinned commit revision, for example patching serde to point at a specific commit on its GitHub repo. This bypasses the crates.io registry entirely for that package, reducing exposure to a compromised or tampered published artifact, and is best applied to less popular packages where a compromise would otherwise take longer to be noticed.

_Developers hardening their Cargo.toml against registry compromises can track supply chain security practices via daily.dev._

### What tools exist for auditing Rust dependencies for vulnerabilities or malicious code?

cargo-audit checks a project's dependencies against a vulnerability database and flags known issues or abandoned crates, while cargo-vet verifies that third-party dependencies have been reviewed by trusted auditors. Google and Mozilla publish their own audit results publicly, which can be imported directly into cargo-vet via the google/rust-crate-audits and mozilla/supply-chain repositories.

_Teams evaluating dependency auditing workflows for Rust projects can follow tooling updates through daily.dev._

## Similar posts on daily.dev

- [Supply chain nightmare: How Rust will be attacked and what we can do to mitigate the inevitable](https://daily.dev/posts/supply-chain-nightmare-how-rust-will-be-attacked-and-what-we-can-do-to-mitigate-the-inevitable-xdchrtlnw) · Hacker News · 0 upvotes · 1 comments
- [No one owes you supply-chain security](https://daily.dev/posts/no-one-owes-you-supply-chain-security-yxzryhi4t) · Lobsters · 1 upvotes · 0 comments
- [Everything you need to know to secure your Rust projects against the wave of cyberattacks](https://daily.dev/posts/everything-you-need-to-know-to-secure-your-rust-projects-against-the-wave-of-cyberattacks-1h8ntzkrh) · Sylvain Kerkour · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Fixing Rust's supply chain security: The good, the bad and the ugly","url":"https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl"},"datePublished":"2026-08-26T16:48:02.932Z","dateModified":"2026-09-14T06:19:02.611Z","description":"An opinion piece analyzing the recent Rust supply chain attack that compromised 9 packages downloaded over 1 million times per day, removed within ~110 minutes...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Sylvain Kerkour","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sylvain Kerkour","logo":"https://media.daily.dev/image/upload/s--3ngWt4Yp--/f_auto,q_auto/v1786438308/logos/kerkour?_a=BAMAMicg0","url":"https://daily.dev/sources/kerkour"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,rust","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sylvain Kerkour","item":"https://daily.dev/sources/kerkour"},{"@type":"ListItem","position":3,"name":"Fixing Rust's supply chain security: The good, the bad and the ugly"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/fixing-rust-s-supply-chain-security-the-good-the-bad-and-the-ugly-kbizyr3bl#faq","mainEntity":[{"@type":"Question","name":"What happened in the recent Rust supply chain attack on crates.io packages?","acceptedAnswer":{"@type":"Answer","text":"Nine backdoored Rust packages, collectively downloaded more than 1,000,000 times per day, were published to crates.io in a supply chain attack. The Rust Security Response Team removed the malicious packages within roughly 110 minutes of the attack being detected, limiting the impact, though the underlying vulnerabilities in the package ecosystem remain unaddressed. Rust developers tightening dependency hygiene after supply chain incidents can follow ongoing coverage on daily.dev."}},{"@type":"Question","name":"How can I stop Cargo from fetching a dependency from crates.io and pull it directly from its git repository instead?","acceptedAnswer":{"@type":"Answer","text":"Use the [patch.crates-io] section in Cargo.toml to override a dependency's source with its git repository and a pinned commit revision, for example patching serde to point at a specific commit on its GitHub repo. This bypasses the crates.io registry entirely for that package, reducing exposure to a compromised or tampered published artifact, and is best applied to less popular packages where a compromise would otherwise take longer to be noticed. Developers hardening their Cargo.toml against registry compromises can track supply chain security practices via daily.dev."}},{"@type":"Question","name":"What tools exist for auditing Rust dependencies for vulnerabilities or malicious code?","acceptedAnswer":{"@type":"Answer","text":"cargo-audit checks a project's dependencies against a vulnerability database and flags known issues or abandoned crates, while cargo-vet verifies that third-party dependencies have been reviewed by trusted auditors. Google and Mozilla publish their own audit results publicly, which can be imported directly into cargo-vet via the google/rust-crate-audits and mozilla/supply-chain repositories. Teams evaluating dependency auditing workflows for Rust projects can follow tooling updates through daily.dev."}}]}
```

