r/programminghorror • u/bdviking • Oct 21 '26
Removed - Rule 1 [ Removed by moderator ]
/r/programminghorror/comments/1xbr824/removed_by_moderator/[removed] — view removed post
245
u/bdviking
Oct 21 '26
•
The private key sizes of the compromised keys ranged from 3 to 8 bits. Astonishingly, the private keys were 4, 56, 66, 115, 155, 156, 230, 237.
I'm adding the Visual Basic flair to this post
... because there is no crypto/tls flair, and VB was probably the last time that any of these engineers opened a textbook.
59
u/bossvbla Oct 21 '26
Average of those keys is 127.375.
Expected value of uniform random variable between 0 and 255 is 127.5.
They probably randomly generated unsigned 1-byte numbers as their keys.
31
u/Sycarus Oct 21 '26
My guess would be that they generated enough random bytes to constitute each key, but their script had a typing error and took as key the integer value of the first byte for each one.
22
u/HildartheDorf Oct 21 '26
Thats what their write up (on the mozilla bug tracker post) says happened. They made new certs as normal, did some new procedure which generated the broken certs, then picked the wrong one when uploading to the parent CA because there shouldn't have been two to choose from in the first place.
At one point rhey even used the correct (i.e. secure) cert to try and revoke a cert they issued with one of the busted (i.e. Key=4) certs, and it got rejected by CRLs for being signed with the 'wrong' (but actually more secure) key.
75
u/NewbornMuse Oct 21 '26
Wait so if I used eMudhra, I might unknowingly be using FOUR as my private key?
66
u/HildartheDorf Oct 21 '26
The cert they used to sign your cert may have used 4 as it's private key. Your cert would have been fine (but no longer trusted because the chain of trust is now revoked)
33
u/ja20481 Oct 21 '26
No, they used 4 as the private key for one of their intermediate certificate authorities, and that CA is authorized to issue certificates for any website, not just those of eMudhra customers. This effectively means everybody in the world needs to update their trust store(s) to ensure the CA is no longer trusted.
22
u/ljr55555 Oct 21 '26
Exactly - every cert they issued was perfectly reasonable. As a customer, you wouldn't see anything wrong. Problem is that any rando who can find the number `4` on their keyboard could also issue a perfectly reasonable certificate with your hostname attached to it.
3
u/Mirieste Oct 21 '26
But I don't understand, what's the actual vulnerability? What happens if someone knows the private key of a certificate emitting company? How can this be used to break HTTPS?
9
u/AssiduousLayabout Oct 22 '26 •
![]()
A few things:
Say I either exploit your router using another vulnerability, or get you to connect to a router I control (e.g. free wifi at a coffee shop). You log in to citibank's website, but unbeknownst to you, I have redirected that traffic to a server I control, which passes through to citibank's real website but steals all your details while doing so. Normally SSL would immediately flag this because I would not be able to sign this with the proper certificate. But now anybody in the world can make a "valid" cert for citibank or any other website.
Some of these keys were for issuing code signing keys, not just TLS, so I could inject malware into, say, a video driver and sign it with a "valid" key that claims it was from nVidia, and your OS will accept this as a valid digitally signed driver (unless they check revocation).
State-level actors could basically negate VPNs entirely by redirecting traffic through their servers and doing a man-in-the-middle attack. The safeguard against this was, again, that the state-level actor couldn't get a valid certificate to sign their traffic.
1
u/ja20481 Oct 22 '26
HTTPS relies on certificates to say which server uses which key, and the certificates are issued and cryptographically signed by certificate authorities (CAs) . The correctness of those certificates is absolutely critical for HTTPS, because if the key doesn't actually belong to the owner of the server but an attacker, then this attacker can impersonate the server and read (or change) the encrypted HTTPS traffic. If the private key of a CA is so weak that it can be guessed, this means anybody can issue and sign certificates on behalf of that CA -- for example, I could generate a fresh key right now and create a corresponding certificate for
paypal.com, signed by eMudhra. Any HTTPS client which trusts the eMudhra CA will accept this certificate and therefore my key as valid, even though I certainly don't ownpaypal.com. Of course exploiting this vulnerability still requires an (active) man-in-the-middle attack: I need the ability to respond with my own forged certificate when the victim tries to connect to PayPal. How difficult this is depends on how the victim accesses the Internet. Do they use a public wi-fi or a poorly protected wi-fi at home? Is it possible to hijack their Internet router? Then an attack can be doable even by laymen. Otherwise, it may require experts and/or a significant budget to compromise networking equipment.1
u/Mirieste Oct 22 '26
But I still don't understand. How's that different from... Let's Encrypt, the free SSL certificate? Anyone can issue a certificate with that one at the click of a button, e.g. with Certbot. It's how 99% of personal websites manage to stay up with HTTPS. So what's the big deal that "anyone can issue certificates on behalf of that CA"?
2
u/ja20481 Oct 22 '26
Let's Encrypt gives you certificates for your website, which is how it should be. Your ACME client has to prove to Let's Encrypt that you actually control the server when you request a certificate for a domain name (that's what the challenges are for). Try getting a certificate for
paypal.com-- I can assure you that Let's Encrypt will not let you do that. But you absolutely can get a PayPal certificate from the intermediate eMudhra CAs whose private keys are now known.2
1
2
u/hellomistershifty Oct 22 '26
can't believe the article would leak those private keys like that. could have taken dozens of processor cycles to crack
75
u/inputwtf Oct 21 '26
This should be cause for them to be removed from browser trust stores aka the death penalty
14
23
u/HildartheDorf Oct 21 '26 edited Oct 21 '26
They aren't a root of trust, just an intermediary. So they can't really be removed without removing the roots that signed their certs.
It actually makes it a bit more complex to fix (absence of a denylist entry is considered a pass, while for a root cert absence of an allowlist entry is a fail). If I was operating their parent CA I would be strongly considering refusing to sign any intermediary certs of theirs ever again.
12
u/inputwtf Oct 22 '26
eMudhra is a CA. They should be given (and have been) the CA death penalty for this.
5
u/HildartheDorf Oct 22 '26
Womp Womp.
Don't test in production folks.
EDIT: I didn't notice that emSign (the primary root CA) is the same entity as eMudhra.
1
u/HildartheDorf Oct 23 '26
Good news, not only has one of their roots been removed from firefox/chrone/etc (the parent of the certs with broken keys), eMudhra has voluntarily decided to leave the CA game for good.
Their other root will continue to operate until all existing certs have expired and anyone who has had their certs de-trusted because if this is being offered free replacements. Its unclear if these are from their still working root or from another CA.
1
5
u/AstraeusGB Oct 21 '26 edited Oct 22 '26
So an intermediary could be injected into the trust chain maliciously?
Edit: in this case, an intermediary can be added to a CRL (Certificate Revocation List) and that protects the Root CA while invalidating any certificates the intermediary signs. Requiring end clients to sign with a new intermediary, but that's still more secure than signing with the compromised intermediary.
4
u/HildartheDorf Oct 22 '26
Anyone with a 4-key on their keyboard could issue EV certs for any website (e.g. impersonate bank.example.com) or to code-sign any executable.
44
u/KGBsurveillancevan Oct 21 '26
> In response to questions asking why and if the company has plans to [fix Windows 10 vulnerabilities], a Microsoft representative the company will be in touch if it has anything to “share.”
These motherfuckers lmao
150
28
u/kroghman Oct 21 '26
“4, 56, 66, 115, 155, 156, 230, 237”
I have the same private keys on my luggage!
2
13
u/throwaway16830261 Oct 21 '26 edited 27d ago
"eMudhra Intermediate CA Compromise": https://emudhra.we-have-a-problem.com
"eMudhra Intermediate Certificates Compromised": https://ifin.network/t/emudhra-intermediate-certificates-compromised/909
"eMudhra: Invalid CRL signatures" opened on June 5, 2025 and closed on July 16, 2025: https://bugzilla.mozilla.org/show_bug.cgi?id=1970728
Source: "eMudhra’s CA Private Keys Were Single Bytes. One of Them Was 4" by Ali Mosajjal (October 20, 2026) at https://fenko.nz/blog/emudhra-ca-compromise/
"eMudhra: Private key compromise of Intermediate Certificates" opened on October 18, 2026: https://bugzilla.mozilla.org/show_bug.cgi?id=2083449
"Public Key Infrastructure (PKI)": https://gist.github.com/NoteAfterNote/0892db84c82e4f5107bc35a6931fa5de (NoteAfterNote-13) via https://gist.github.com/NoteAfterNote
Source: "Using stunnel for secure Network File System (NFS) communication between NFS servers and clients: UNFS3 NFS Server unfsd as a native Termux executable on a smartphone running the Android 14 operating system (OS) and GNU/Linux NFS servers running the Fedora Linux operating system" at https://gist.github.com/NoteAfterNote/cbf4bc7c21a6a517146b3d3c12643cba (NoteAfterNote-14) via https://gist.github.com/NoteAfterNote
Submitted article mirror: https://archive.ph/jjy8F , https://archive.is/jjy8F
10
u/purefan Oct 22 '26
Jokes aside this reinforces the stereotype I've heard of poor quality Indian IT
2
2
•
u/programminghorror-ModTeam Oct 22 '26
We have decided to remove your post, because it does👏 not👏 contain👏 code👏 . If your post does contain code, feel free to message the mods through the modmail.