Skip to content

Add Go 1.26.11 module and move users off Go 1.25 to fix CVE-2026-97040 - #520

Merged
akramhussein merged 1 commit into
mainfrom
akram/go-1.26.11-cve-2026-97040
Nov 18, 2026
Merged

akramhussein merged 1 commit into
mainfrom
akram/go-1.26.11-cve-2026-97040

Conversation

@akramhussein

@akramhussein akramhussein commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

CVE-2026-97040 (GO-2026-6851, https://pkg.go.dev/vuln/GO-2026-6851) is a critical bug in the Go toolchain. Building a package that contains a crafted .syso file can sneak extra flags into the linker. It is fixed only in Go 1.26.11 and 1.27.4. Go 1.25 and older will not get a fix.

Today every Replit workspace that uses Go gets Go 1.25 (1.25.5 from our nixpkgs pin), so users are exposed. Slack discussion: https://replit.slack.com/archives/C03FS477T17/p1794982992131789

What changed

  • flake.nix: build Go 1.26.11 by taking nixpkgs' go_1_26 (which is only 1.26rc1 in our lock) and pointing it at the official 1.26.11 source tarball. A matching buildGo126Module is built on top of it so gopls is compiled with the same Go.
  • pkgs/modules/default.nix: the Go module now uses that Go 1.26.11 and gopls, so it registers as go-1.26 instead of go-1.25.
  • pkgs/upgrade-map/default.nix: the unversioned go alias and go-1.25 now resolve to go-1.26. Older IDs (go-1.19 through go-1.24) already chain through go-1.25, so they also land on 1.26.
  • pkgs/default.nix: the small dev bundle ships go-1.26 instead of go-1.25.

The go-1.25 implementation is removed rather than kept next to 1.26. This follows the README's retirement rule (remove the registration, keep the old ID as an upgrade alias) and the way Go 1.24 was retired. Keeping 1.25 around would leave a version with no security fix available to users.

Heads up for reviewers: this changes the Go version for real users. Anyone on go, go-1.25 or an older Go ID gets Go 1.26 the next time they pick up a new bundle. Go keeps strong backwards compatibility, but a project that pins an old go or toolchain line or relies on 1.25-only behavior could notice. If you would rather keep 1.25 available for a while, say so and I will add 1.26 alongside it instead.

Test plan

  • nix eval .#modules lists go-1.26 as an implementation, with go, go-1.19 to go-1.25 as aliases. The registry checks (no shadowing, no cycles) pass at evaluation time.
  • nix build '.#"go-1.26"' succeeds and builds Go from the 1.26.11 source tarball.
  • go version from the built module reports go version go1.26.11 linux/amd64.
  • gopls v0.21.0 in the module is compiled with go1.26.11 (go version <gopls binary>).
  • A hello-world go run . with the new Go works.

Rollout

Ships with the next bundle publish. Existing published bundles are not changed. Reverting this PR restores Go 1.25 cleanly, no data or state is involved.

  • This is fully backward and forward compatible

Not ticked: users on Go 1.25 and older move to Go 1.26 (see the heads up above).

~ written by ⠕ Replit

Build the Go module from Go 1.26.11, the first 1.26 release with the fix for
CVE-2026-97040 (GO-2026-6851). Go 1.25 gets no fix, so retire go-1.25 and send
it, and the unversioned go alias, to go-1.26 through the upgrade map.

Assisted-by: Replit
@akramhussein
akramhussein requested a review from vlinkz November 18, 2026 15:08
@akramhussein akramhussein self-assigned this Nov 18, 2026
@akramhussein
akramhussein marked this pull request as ready for review November 18, 2026 15:11
@akramhussein
akramhussein requested a review from a team as a code owner November 18, 2026 15:11
@akramhussein
akramhussein merged commit 43a0070 into main Nov 18, 2026
8 of 9 checks passed
@akramhussein
akramhussein deleted the akram/go-1.26.11-cve-2026-97040 branch November 18, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants