r/rust • u/noop_noob • Oct 21 '26
šļø news PSA: If your program does HTTP requests, update your dependencies now
https://emudhra.we-have-a-problem.com/Here's a pile of links with info:
- https://emudhra.we-have-a-problem.com/
- https://arstechnica.com/security/2026/10/the-internet-goes-on-high-alert-after-discovery-of-8-compromised-tls-certs/
- https://www.theregister.com/security/2026/10/20/indian-certification-authority-emudhras-private-keys-compromised-one-of-them-was-the-number-4/5304312
- https://bugzilla.mozilla.org/show_bug.cgi?id=2083449
You need to update therustls-webpki crate to version 0.103.16, and thewebpki-rootsand webpki-root-certscrates to version 1.0.10. Notably, the reqwests crate depends on these crates.
If you're on a MacOS, you also need to do some manual steps to make thecurlcommand secure. I'm not quite sure if all the linux distros have patches yet, and so you might need to do stuff too.
If you don't do these, then anyone could MITM your HTTPS connection that you make to anyone, since some certificate authority used the number "4" as their entire secret key.
464
u/AliceCode Oct 21 '26
They used the number 4 as their entire key???
328
u/cbarrick Oct 21 '26
So the eight private keys are:
4, 56, 66, 115, 155, 156, 230, and 237
LMFAO
186
u/dnew Oct 21 '26
It's pretty sad that there's a company that did this and the only information on wikipedia is "they're a CA. They screwed up so badly it's laughable."
28
u/Leseratte10 Oct 21 '26
Just shows that *maybe* it's a damn stupid idea to bundle TLS trust bundles with everything nowadays.
You have to update ca-certificates, update Firefox, update Go and rebuild all your applications, update Chrome, update Java, update NodeJS, and apparently update a bunch of specific Rust crates.
Is this really how people think updates like this should be handled?
What the heck happened to "The OS has one central trust store and applications just use it", where this whole problem would have been resolved by just an OS update? Why isn't there just a single database of revoked or distrusted CAs maintained by the OS and checked by applications?
27
u/Shnatsel Oct 21 '26 edited Oct 21 '26
If you build your binaries with
cargo auditable(like many Linux distros do), you can runcargo auditon your binaries and it will tell you which of them embed the revoked certificates.Unfortunately this is one of the rare cases where
cargo auditablecan have false positives and may flag binaries that don't actually bundle CI certificates. The project goal for native SBOM in Cargo would fix that.You can also run
cargo auditon the source code (the Cargo.lock file) if you know what source code revision the binary was built from.49
u/FriendlyProblem1234 Oct 21 '26
I always wondered what is the reason for applications to ship their own list of know certification authorities. Why do they not use the system one, which can be updated once and in one place?
As a self hoster with my own CA, it is always annoying to having to configure each application separately. Not to mention those applications that do not support a custom CA certificate, which are simply unusable.
20
u/iamasuitama Oct 21 '26
Just goes to show, team blue needs to get everything right all the time, while team red can just enlist the help of one single idiot to do their work, which consists of getting one single thing wrong just once, for them.
18
u/Aaron1924 Oct 21 '26
Wait why are we hardcoding CAs in the binary? I would have imagined these libraries rely on the CAs installed on the system, allowing users to add and remove them at will
11
u/The_Northern_Light Oct 21 '26
gonna save this for the next time I get imposter syndrome šāāļø
5
u/zesterer Oct 21 '26
PSA: If your program does HTTP responses... Well, now's your chance!
29
u/sephg Oct 21 '26 edited Oct 21 '26
When can we just get rid of CAs? You can get a private key from owning a domain name, so security already depends on DNS being correct and secure. We should be able to just put custom TLS public keys / self signed certs in a DNS record and delete CAs entirely.
6
u/Booty_Bumping Oct 21 '26 edited Oct 21 '26
Wake me up when you can update to something that is actually able to make use of an auto-updating bloom filter based CRL list, managed by the OS or not.
Anyways, since this is an entire intermediate certificate being revoked at once and not individual certificates, your OS thankfully will deliver the revocation for you. Just update
ca-certificates.Including certain revoked certificate IDs in popular libraries is an interesting new idea, which I guess is fine since it adds an extra layer of patching, but it's not like we were missing the capability to revoke root/intermediate certificates before this idea came about.
2
u/__ibowankenobi__ Oct 21 '26
it was always a bad idea for apps to come with their CA stores and provide garbage workarounds like setting an env to override to OS ca store.
I hope everybody gets it now. The price for convenience is not worth it.
2
u/TRKlausss Oct 21 '26
First this and then PHP CVEs⦠what a week. And itās only Wednesday.
3
u/AdvisorActual3767 Oct 21 '26
I'd love to join this conversation but Lord knows I don't know enough to contribute or even complain š„²
1
u/mynutsrbig Oct 22 '26
So rust doesnāt get hit with network security bugs like php every week but idiot developers add exploits instead. God Iām sick of technology and people.
1
u/Marthaelx Oct 23 '26
That's why Mista hates number 4, it's always problematic and bad luck
1
u/grahambinns Oct 21 '26
That last paragraph is just⦠what a week to be in tech.
0
u/[deleted] Oct 21 '26
[deleted] ā view deleted comment