DEV Community

Ercross
Ercross

Posted on

Vulnerability Report: GO-2026-6809 [Breakdown]

𝗛𝗲𝗿𝗲'𝘀 𝘄𝗵𝗮𝘁 𝗖𝗩𝗘-𝟮𝟬𝟮𝟲-𝟭𝟭𝟭𝟵𝟰𝟯 𝗺𝗲𝗮𝗻𝘀 𝗳𝗼𝗿 𝘆𝗼𝘂𝗿 𝗚𝗼 𝘀𝗲𝗿𝘃𝗶𝗰𝗲𝘀

Go 1.27.3 and 1.26.10 shipped this week with a fix in 𝚌𝚛𝚢𝚙𝚝𝚘/𝚡𝟻𝟶𝟿. The changelog makes it sound small. It isn't, so here's the plain-English version.

𝗧𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺, 𝘀𝗶𝗺𝗽𝗹𝘆

When your Go code calls 𝚑𝚝𝚝𝚙.𝙶𝚎𝚝("𝚑𝚝𝚝𝚙𝚜://𝚊𝚙𝚒.𝚜𝚝𝚛𝚒𝚙𝚎.𝚌𝚘𝚖"), how does it know it's really talking to Stripe?

The server shows a certificate, like an ID card. Your program checks that the ID was stamped by an authority it trusts (a Certificate Authority, or CA).

Now imagine one of those authorities made its official stamps so badly that anyone could recreate them in seconds.

That's roughly what happened with eMudhra, an Indian CA. A flaw in their key generation produced 8 intermediate CA keys with almost no randomness. One key was literally the number 4. The others were small whole numbers under 256. Researchers recovered all of them from the public certificates in under a second on a laptop.

With one of those keys, an attacker can create a "valid" certificate for ANY domain: your bank, your payment provider, your own API. Your Go program would happily accept it. 😬

𝗪𝗵𝗲𝗻 𝗮𝗿𝗲 𝘆𝗼𝘂 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗲𝘅𝗽𝗼𝘀𝗲𝗱?

All of these have to be true:

  • Your Go program makes outgoing TLS connections (HTTP clients, gRPC clients, webhooks, database drivers with TLS)

  • It was built with Go older than 1.26.10, or 1.27.0 to 1.27.2

  • The machine or container it runs on still trusts the eMudhra roots (an old base image, a distro that hasn't shipped updated ca-certificates yet, or certs baked into a 𝚜𝚌𝚛𝚊𝚝𝚌𝚑/distroless image)

  • An attacker can get between your service and the server it's calling (a compromised network, DNS spoofing, a malicious proxy, shared Wi-Fi)

If any one of these is false, the attack breaks. Number 4 is the hardest part for an attacker. Recovering the key is trivial.

𝗪𝗵𝗮𝘁 𝘁𝗼 𝗱𝗼

  • Upgrade to Go 1.27.3 or 1.26.10 and REBUILD your binaries. Go compiles the fix into your program, so updating Go on your laptop protects nothing that's already deployed.

  • Rebuild container images so they pick up fresh ca-certificates

  • Run 𝚐𝚘𝚟𝚞𝚕𝚗𝚌𝚑𝚎𝚌𝚔 ./... to see if you're affected

  • On Go 1.25 or older? It gets no fix. This is a good reason to upgrade.

https://pkg.go.dev/vuln/GO-2026-6809

Top comments (0)