Most Rust projects don't bundle CA roots
By Kunal MehtaIn the fallout from the eMudhra certificate "compromise", there were a few posts going around discussing how Rust projects, with the specific example of uv, needed to issue releases with an updated bundled set of CA roots.
For example, Michał Górny posted:
Many #RustLang packages (think uv) also use a bundled certificate store. All these packages need a lockfile update and rebuilding, meaning downstream patching or new upstream release. So yes, everyone (including Gentoo users, because Rust doesn't really support dynamic linking, great design for #security) need to update uv, and possibly wait to discover more random Rust packages that are vulnerable.
Andrew Nesbitt repeated this as well:
Rust tools like uv compile webpki-roots into the binary, so each one needs a rebuild and a release, and so does any container image that includes them.
I am not trying to call people out here, because up until I did the research for this post, this was what I believed too. When the news of eMudhra dropped, I immediately spent a few hours just bumping the webpki-root-certs crate in a bunch of projects and rebuilding and redeploying everything.
Obviously I was not happy about that, so I started looking into how reqwest (one of the most popular HTTP libraries) handles TLS and certificate verification to see if there was a way I could set it to just use the system cert store. To my surprise, it was already doing that!
Background#
There were two actions taken with the eMudhra compromise, either of which would protect your connections.
First was stopping use of the intermediate certificates which used weak private keys. Browsers have CRLite/CRLSets for this, whereas Linux does not yet have a way to stop use of distrusted intermediate certs (see upki).
So some TLS implementations added their own hardcoded blocks, like golang, Python and the rustls-webpki crate.
The second step was distrusting the underlying root cert used by eMudhra, aka "emSign ECC Root CA - G3". Normally this is provided by the operating system, e.g. Debian and Fedora released updates to their ca-certificates system package, but the set of root certificates is also often provided as a language package.
Python has the certifi package, PHP/Composer has ca-bundle, and relevant to this blog post, Rust has webpki-root-certs.
So the question I set out to answer was: where is webpki-root-certs being used, and can I instead switch to a crate that uses the system store from ca-certificates?
webpki-root-certs#
When I ran cargo audit in one of my projects, I saw something like:
Crate: webpki-root-certs
Version: 1.0.9
Title: Bundled root certificates allow trust in distrusted emSign intermediates
Date: 2026-10-19
ID: RUSTSEC-2026-0383
URL: https://rustsec.org/advisories/RUSTSEC-2026-0383
Solution: Upgrade to >=1.0.10
Dependency tree:
webpki-root-certs 1.0.9
└── rustls-platform-verifier 0.7.0
└── reqwest 0.13.4
└── <project> 0.1.0
By default, reqwest 0.13 uses the rustls-platform-verifier crate, which on most platforms, including Linux, macOS, Windows, Android, iOS, it uses the system cert store. Great, that's exactly what I wanted, no bundled certs!
But why does my project still have a dependency on webpki-root-certs in my Cargo.lock? Turns out rustls-platform-verifier depends on it only for the wasm32 target, and even then, it doesn't actually get used in browsers, because that uses the browser's TLS stack and not rustls.
On my Linux x86_64 machine, cargo "informs" you that it's not actually used on this specific platform by omitting the dependency entirely:
$ cargo tree -i -p webpki-root-certs
warning: nothing to print.
To find dependencies that require specific target platforms, try to use option `--target all` first, and then narrow your search scope accordingly.
Unfortunately it's not possible to configure cargo audit to exclude dependencies on this basis (issue), so it will still show up in your reports. There's also an issue for cargo to allow setting platforms your project will run on so extraneous dependencies (e.g. Windows-specific crates on Linux) can be omitted from Cargo.lock entirely.
So, if you're using reqwest 0.13 with the default configuration outside of wasm32, you're (correctly IMO) using your system's certificate store and any warnings or alerts about an outdated, bundled certificate store are a symptom of misleading tooling. It is accurate that your project references an outdated crate, but that crate isn't actually being used.
What about uv?#
I think a lot of people saw uv issue an immediate release and assumed that it was representative of the broader Rust ecosystem. Like previously mentioned, this included me too.
However, uv explicitly uses a set of bundled certificates (documentation), unless you pass --system-certs or set UV_SYSTEM_CERTS=true. This is an intentional choice made by the uv authors (similar to pip), and not an inherent property of Rust or a Rust library; uv actually had to go out of its way to switch to bundled certificates.
It is interesting how "uv" became a standin for "Rust" as a whole, when Rust is one of the few(?) modern programming languages that doesn't ship its own TLS stack and instead relies on user packages (usually rustls or native-tls). I too am leaning into that, by using "Rust" where I really mean "reqwest".
There are Rust crates that do default to bundling certs such as ureq, which is another, less popular, HTTP library. As such, I've been switching all my projects away from ureq to reqwest.
Final thoughts#
My impression is that the majority of Rust projects are probably correctly using the system root certificate store, and did not need to go through a "update dependencies, rebuild, deploy" cycle to be protected as long as you updated your system's root certificate store. That said, Rust projects had an extra defensive layer if they picked up the rustls-webpki update, which immediately blocked the use of the intermediate certs even before the root certificate was removed (OpenSSL never implemented rejection of the intermediate certs).
reqwest has good defaults, and is a good choice to build on top of. On the other hand, uv goes out of its way to use bundled certs and is actually quite a bad representative for what the default reqwest behavior is.
Given current tooling limitations, I think it is a mistake for reqwest and/or rustls-platform-verifier to keep rustls-root-certs as a dependency (albeit conditionally based on the platform) when it's not probably being used in the majority of projects. And given that the specific subset of wasm32 that needs it is complex enough, I suspect those people can correctly figure out how to add the rustls-root-certs dependency to their project.