Go 1.27.4 and 1.26.11 Fix 12 Security Issues, Mostly in cgo Builds

Go 1.27.4 and Go 1.26.11 came out on November 10, 2026, and they fix 12 security issues. According to the release history, the security fixes are in cgo, the go command, the compiler, the linker and the net/http package. Go also turned 17 that same day, so I’ll end with a short note on that.

Eleven fixes are about building code you don’t trust

The announcement on golang-announce lists all 12 fixes, each with its own CVE number. Eleven of them have the same shape: building a malicious package could run code on your machine, or pass flags to the linker that Go would normally refuse.

Most of these involve cgo, the feature that lets Go code call C code. A package that uses cgo can ask for extra C compiler and linker flags with #cgo lines in its source. The go command only allows flags it considers safe, and these fixes close gaps in that check. One example from the announcement: --sysroot and -target are no longer allowed in #cgo flags (Go issue 82577). Other fixes deal with crafted .syso files, #cgo pkg-config: lines and //go:cgo_* compiler directives.

Eight of the 12 issues were found by the Go Security Team during an internal audit. Outside researchers reported the other four.

Why does this matter when you’re learning? Because you build other people’s code all the time. Every time you build a program that imports a package you found online, you compile code you haven’t read. With these bugs, a malicious package could do damage during the build, before you ever ran your program. You don’t need to understand linker flags to be protected. You only need the new toolchain.

One fix is inside your own programs

The twelfth fix is in net/http, tracked as CVE-2026-97054 and Go issue 82563. It affects HTTP/1 servers that use http.MaxBytesReader or http.MaxBytesHandler to limit the size of a request body. I show MaxBytesReader in my HTTP server lesson, so you may have it in your own code.

When a request goes over the limit, the server sets a Connection: close header by itself. The announcement explains that this happened without synchronization. If your handler read the request body and wrote response headers at the same time, the two could race and the server could crash with a runtime panic.

This fix is different from the other eleven. The net/http code is compiled into your binary, so installing the new Go doesn’t fix a server that’s already running. You have to rebuild it and deploy it again.

What to do

Check which Go you have, and which Go a program was built with:

go version
go version -m ./myserverCode language: Bash (bash)

If you see anything older than go1.27.4 or go1.26.11, get the new release from go.dev/dl. That takes care of the eleven build-time issues. If you run an HTTP server that uses MaxBytesReader or MaxBytesHandler, rebuild and redeploy it too. Both releases also include regular bug fixes, in the compiler, the runtime and packages like crypto/tls and net.

Go turned 17

November 10 was also the 17th anniversary of Go’s open source release. The Go team marked it with a long blog post, Go Turns 17, that looks back at Go 1.26 and 1.27 and ahead to next year.

One plan in there will change the code you write every day. The post says Go 1.28 will let composite literals leave out redundant types whenever the type can be inferred from context. If you’ve typed the same struct type over and over in a nested literal or a table-driven test, you know why people have asked for this. The post also says the team has just accepted proposals for generic collection types, including sets and ordered maps. Those will land in golang.org/x/exp first, so people can try them before they’re considered for the standard library.

Sources