Go 1.27.4 fixed 12 flaws. Dependabot never bumped my golang:1.25 image
On 10 November, Go 1.27.4 and Go 1.26.11 shipped with twelve security fixes. Go 1.25 got none. On 1 December, I opened the repositories of my twelve Go services. Eleven still build with golang:1.25-bookworm. Dependabot h
On 10 November, Go 1.27.4 and Go 1.26.11 shipped with twelve security fixes. Go 1.25 got none. On 1 December, I opened the repositories of my twelve Go services. Eleven still build with golang:1.25-bookworm. Dependabot has merged dozens of module bumps this year. It never touched the FROM line.
TL;DR: Go supports only the two latest major releases. Since 19 August, Go 1.25 is no longer one of them, and the
golang:1.25-bookwormimage has not moved. The twelve fixes of 10 November will never reach it. Nothing in my repositories watched that line: Dependabot only looked atgomod. Three fixes: add thedockerecosystem, write the version ingo.mod, and a CI test that refuses a dead Go line.
State of the sources and of my repositories: checked on 1 December 2026. Check the current versions on go.dev before you change a Dockerfile.
This article is for teams that build their Go services in Docker and leave updates to Dependabot or Renovate.
Twelve fixes on 10 November, and nothing for Go 1.25
The 10 November announcement lists twelve flaws. Eleven hit the build. A malicious module that uses cgo could run code on your build machine. The vectors are compiler options, .syso files disguised as Go objects, and GCC spec files dropped in a library folder. These are CVE-2026-97033 to 97043.
The twelfth flaw, CVE-2026-97054, hits net/http at run time. An HTTP/1 server that uses MaxBytesReader or MaxBytesHandler can crash. The handler only has to read the request body while it writes the response headers. That one needs no trapped module. It needs a client.
These fixes exist for Go 1.27 and Go 1.26. Not for Go 1.25. Go's policy says it in one sentence: "Each major Go release is supported until there are two newer major releases". Go 1.27.0 came out on 19 August 2026. The same day, Go 1.25.14 became the last release of its line.
On 1 December, my Dockerfiles had not moved
I went through the twelve repositories of my personal project. Twelve Go services, one Dockerfile each, one go.mod each. Here is what I found.
- Eleven Dockerfiles start with
FROM golang:1.25-bookworm AS builder. - The twelfth says
golang:1.26.1-bookworm. The current release of that line is 1.26.11. Ten fixes behind. - All twelve
go.modfiles saygo 1.25.0.
I ran the image exactly as my builds pull it:
docker run --rm golang:1.25-bookworm go version
# go version go1.25.14 linux/amd64
On Docker Hub, the 1.25-bookworm tag was last pushed on 19 August. It will not move again. A floating tag like 1.25-bookworm promises "the latest 1.25". When the line dies, the promise is kept, and it is worth nothing.
The embarrassing part is that I knew. In my article of 2 November, I wrote that this image would never be fixed again. One month later, my Dockerfiles say the same thing. A known fact without automation stays a fact. It does not turn into a pull request.
Dependabot watched gomod, so it saw nothing
Dependabot does what it is told, one ecosystem at a time. Here is my .github/dependabot.yml, in full:
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
One ecosystem. It did its job well: the last merged PR, on 17 September, bumped an internal module from 0.65.0 to 0.66.0. Every PR from that bot touches the require lines of go.mod. None touched the go 1.25.0 line. None opened the Dockerfile, because nobody told it to read one.
I do not blame the bot. I gave it one pair of glasses. The Go version lives in three places, and I watched none of them.
The Go version lives in three places, and Dependabot watched none of them. The Dockerfile, the go.mod and the CI runner each pin a version. The binary inherits the Dockerfile's, and only go version -m tells you which.
Three places, and in my case three versions
The Dockerfile pins the version that builds the production image. The go.mod pins a minimum, and since Go 1.21 it can also require an exact one. The CI runner runs the tests with whatever Go it has on hand.
My CI workflow runs on a runner I host myself. It has no setup-go step. The version that runs the tests is written nowhere in the repository. In November, I had already counted three Go versions on the same project. One for the tests, one for the image, one in an old binary. The tests were green. They say nothing about the version that built the image.
To know what really runs, ask the binary:
go version -m ./my-service | head -1
# ./my-service: go1.25.14
govulncheck -mode=binary ./my-service
govulncheck reads the Go version inside the binary and lists the standard library flaws it carries. With a binary built in 1.25.14, the net/http flaw of 10 November is in there. It stays there until the Dockerfile changes.
Fix 1: add the docker ecosystem to Dependabot
Three more lines in dependabot.yml:
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
Dependabot's documentation explains how it reads a tag. It extracts a version, then only proposes a tag with the same prefix and the same suffix. 1.25-bookworm reads as <version>-<suffix>. The 1.27-bookworm tag has the same shape, so Dependabot proposes it. For the twelfth service, it will propose 1.26.11-bookworm.
One limit to know. Dependabot proposes a newer version. It will never tell you that your line is no longer supported. If you close the "1.25 to 1.27" PR because the jump looks scary, you are back where you started. That is what the third fix is for.
Fix 2: write the version in go.mod, not only in the Dockerfile
Since Go 1.21, the go line of go.mod is no longer a plain minimum. If it asks for a version newer than the installed Go, the go command downloads that version and builds with it. That is the GOTOOLCHAIN=auto setting, on by default in the official distributions.
go get go@1.27.4
# go.mod: go 1.27.4
With that line, even my golang:1.25-bookworm image builds in 1.27.4. Its Go 1.25.14 acts as a launcher, downloads 1.27.4 and hands over. The resulting binary says go1.27.4. And that line lives in a file I read on every PR, not in a Dockerfile I open twice a year.
That is no reason to keep the old image. The download happens on every uncached build, it needs the network, and the launcher is still an old Go. I change both: the Dockerfile for the build, the go.mod so that every laptop and every runner builds the same way.
Fix 3: a CI test that refuses a dead Go line
Go publishes the list of supported releases as JSON. Without parameters, go.dev/dl/?mode=json returns only the lines that still get fixes. On 1 December: 1.27.4 and 1.26.11. The test compares the Dockerfile's line to that list.
#!/bin/sh
# Fails when the Dockerfile builds with a Go line that no longer gets fixes.
supported=$(curl -sf 'https://go.dev/dl/?mode=json' \
| jq -r '.[].version' | sed -E 's/^go(1\.[0-9]+).*/\1/' | sort -u)
have=$(grep -m1 -oE '^FROM golang:[0-9]+\.[0-9]+' Dockerfile | cut -d: -f2)
echo "$supported" | grep -qx "$have" \
|| { echo "golang:$have is no longer supported (supported: $(echo "$supported" | tr "\n" " "))"; exit 1; }
Run on eleven of my repositories, it fails with "golang:1.25 is no longer supported". That is the expected result, and the proof that it bites. It will run in CI every week, not only on pull requests. A Go line dies on a Tuesday in August, with no commit on your side.
The same test in Go fits in Dockerfile_test.go, for teams without jq on their runners:
func TestBuildImageIsOnASupportedGoLine(t *testing.T) {
resp, err := http.Get("https://go.dev/dl/?mode=json")
if err != nil {
t.Skip("go.dev unreachable:", err)
}
defer resp.Body.Close()
var releases []struct{ Version string }
if err := json.NewDecoder(resp.Body).Decode(&releases); err != nil {
t.Fatal(err)
}
supported := map[string]bool{}
for _, r := range releases {
supported[strings.Join(strings.Split(strings.TrimPrefix(r.Version, "go"), ".")[:2], ".")] = true
}
df, err := os.ReadFile("Dockerfile")
if err != nil {
t.Fatal(err)
}
m := regexp.MustCompile(`(?m)^FROM golang:(\d+\.\d+)`).FindSubmatch(df)
if m == nil {
t.Fatal("no FROM golang:<major.minor> line in Dockerfile")
}
if line := string(m[1]); !supported[line] {
t.Fatalf("golang:%s is no longer supported, supported lines: %v", line, supported)
}
}
What I am changing
The checklist
A floating tag promises the latest release of a line. It does not tell you when the line dies.
- [ ] List your
FROM golang:lines and compare them togo.dev/dl/?mode=json - [ ] Run
go version -mon a deployed binary, not on your laptop - [ ] Run
govulncheck -mode=binaryon that binary - [ ] Open
dependabot.ymland check thatdockeris there, not onlygomod - [ ] Raise the
goline ofgo.modwithgo get go@<version> - [ ] Write the CI's Go version into the repository, with
setup-goandgo-version-file: go.mod - [ ] Add a weekly test that fails when the Dockerfile's line is no longer supported
What to remember
On 10 November, Go fixed twelve flaws. My repositories saw nothing, because nobody had told them to look. Dependabot watched the modules, carefully, every day. The Go version was written in a file it never opened.
A fact you know protects nothing. A test that fails does. Give the bot the file it is missing, and give CI the list of living lines.
Want your Go build chain put through the same exam? Have a look at my DevSecOps package, or let's talk.
Sources: Go 1.27.4 and 1.26.11 announcement (10 November 2026) ยท Go release policy and history ยท GO-2026-6853 (CVE-2026-97038) ยท Go toolchains and GOTOOLCHAIN ยท Dependabot, Docker tag parsing ยท golang image on Docker Hub ยท survey of my repositories on 1 December 2026.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.