CVE
CVE-2026-94444, CVE-2026-94447
CWE
CWE-354
Affected Surface
- Go toolchain `cmd/go` versions `< 1.26.9` and `>= 1.27.0-0, < 1.27.2`
- Developer workstations, CI jobs, and build agents that run `go` inside attacker-controlled repositories while using a `GOPROXY` or `GOMODPROXY` endpoint the attacker can influence
- Go 1.21 and later environments that allow automatic `golang.org/toolchain` downloads
- Go 1.24 and later environments that use bundled `golang.org/fips140` snapshots through `GOFIPS140`
Go’s 8 October 2026 security release included two supply-chain-relevant fixes in cmd/go: CVE-2026-94444 and CVE-2026-94447. Neither bug is a generic “download any module and get owned” case. Both require a more specific setup: the victim has to run go inside an attacker-controlled repository and use a module proxy the attacker can influence. But once those conditions are true, the target is not just a library checksum. It is the integrity of executable build inputs that cmd/go may fetch or unpack on the developer’s behalf.
That is why these two CVEs matter. The vulnerable code accepted attacker-controlled local integrity state too early. In one branch, a repository-supplied go.sum line could short-circuit the canonical checksum database path for downloaded toolchains. In the other, the bundled golang.org/fips140 snapshot path reused module-cache state without anchoring it to a trusted module zip hash.
Affected package and threat model
The affected package is the Go toolchain itself, specifically cmd/go.
| CVE | What the attacker needs | What the attacker gets |
|---|---|---|
CVE-2026-94447 | A malicious Go repository plus a malicious or attacker-controlled module proxy | A downloaded golang.org/toolchain payload can bypass the checksum database path and be accepted as if its checksum were already trusted |
CVE-2026-94444 | A malicious Go repository plus a malicious or attacker-controlled module proxy | A fake golang.org/fips140 module can be planted in the module cache and later reused as trusted FIPS snapshot content |
The fixed versions are:
| Component | Fixed versions |
|---|---|
cmd/go | 1.26.9 and 1.27.2 |
Practical reach is narrower than the semver range implies:
CVE-2026-94447matters where automatic toolchain download is in play, which means modern Go installations that can resolvegolang.org/toolchainCVE-2026-94444matters whereGOFIPS140is used, which is a smaller but security-sensitive slice of Go deployments
CVE-2026-94447: a bogus go.sum line could outrank the canonical checksum path
The cleaner of the two bugs is CVE-2026-94447. The vulnerable path lived in checkModSum(), where a matching go.sum entry set done = true and the function returned before consulting the checksum database:
if done {
return nil
}
// Consult checksum database if appropriate.
if useSumDB(mod) {
...
}
That is fine for ordinary modules whose go.sum lines come from a repository you already trust. It is not fine for golang.org/toolchain, because the repository under inspection is part of the threat model. A malicious project can hand you a go.sum line for the exact toolchain version it wants you to download, and a malicious proxy can then serve bytes that match the planted local hash instead of the canonical checksum database.
The fix is small and very revealing:
if done && mod.Path != "golang.org/toolchain" {
return nil
}
if useSumDB(mod) {
...
}
if done {
return nil
}
That change forces golang.org/toolchain back through the network-backed checksum authority even when the local go.sum already has a matching line. The corresponding test scripts, gotoolchain_switch_gosum.txt and mod_download_toolchain_gosum.txt, explicitly model the attacker repository case by recording a toolchain line in go.sum, clearing cache state, pointing GOSUMDB at a disagreeing server, and asserting that the download now fails with a checksum mismatch and SECURITY ERROR.
The related useSumDB() comment was tightened too:
// Toolchain downloads must be verified against the checksum database,
// even if GOSUMDB=off or GONOSUMDB matches the pattern.
That is the right trust model. Downloaded toolchains are executable infrastructure, not just source dependencies.
CVE-2026-94444: the bundled FIPS snapshot path lacked a trusted module zip hash anchor
CVE-2026-94444 is a little subtler. The affected target is golang.org/fips140, the bundled snapshot Go can unpack when GOFIPS140 is enabled. Before the fix, module-cache reuse had a carve-out that skipped the normal .ziphash anchor:
// Special case: ziphash is not required for the golang.org/fips140 module,
// because it is unpacked from a file in GOROOT, not downloaded.
if m.Path == "golang.org/fips140" {
return dir, nil
}
That shortcut meant cached golang.org/fips140 content could be treated as complete without proving it came from the bundled snapshot whose integrity Go meant to trust. In the threat model from the advisory, the attacker-controlled repository and attacker-controlled proxy could arrange for an arbitrary golang.org/fips140 module to populate the cache first. Later FIPS snapshot handling could then reuse that cache entry because it had no trusted module zip hash to compare against.
The patch closes that gap in two linked ways.
First, lib/fips140/fips140.sum stopped being only a raw SHA-256 list and became a dual-record format:
# Each line is "NAME SHA256HEX H1HASH"
v1.26.0.zip 9b28f847... h1:dtoPX1ALGGp4rMLzyh6oqIkYRXnXxRkpPWu56l5DFpM=
Second, the unpack path started threading that trusted h1: value into the module-cache flow:
_, ziphash, err := lookupZipSum(sumfile, filepath.Base(file))
verify := func() error { return verifyZipSum(file, sumfile) }
zdir, err := modfetch.NewFetcher().Unzip(ctx, mod, file, ziphash, verify)
From there, Fetcher.Unzip() only reuses a cached copy if the cache records the same ziphash in its .ziphash sidecar. If the hash is missing or wrong, Go discards the cached tree and unpacks the trusted bundled snapshot again. The new fipssnap_modcache.txt test makes that behavior explicit by writing a fake bad.ziphash, planting a stale sha256.go, and checking that the stale file is replaced during the next run.
This is the line that mattered operationally: Go used to verify the bundled ZIP’s raw SHA-256, but it did not bind the unpacked module-cache tree to the same identity primitive that downloaded modules use. After the fix, the FIPS path has both checks: ZIP-file integrity and a canonical module zip hash for cache reuse.
Why these bugs matter in real environments
These are developer-surface bugs, not public-internet service bugs. They sit where an engineer clones code, points GOPROXY at a corporate mirror or private proxy, and lets go resolve build inputs automatically.
That setup is common enough to matter:
- companies often document a private
GOPROXYas the standard bootstrap path - CI systems frequently inherit proxy settings from shared runners or organization-wide environment templates
- developers do not usually inspect
go.sumentries forgolang.org/toolchain - FIPS-enabled environments already live in a higher-assurance context, which makes cache-integrity shortcuts more important, not less
The attacker does not need a generic go get remote execution trick here. They need to steer trust so that cmd/go accepts the wrong checksum authority or the wrong cached identity. Once that happens, the payload that follows is a toolchain or FIPS snapshot input, which is about as close to the build root of trust as application developers get.
Detection and response
Start by checking the local Go version and the proxy settings that shape module trust:
go version
go env GOPROXY GOSUMDB GONOSUMDB GONOPROXY GOTOOLCHAIN GOFIPS140
Then look for repository or pipeline settings that override the default proxy and checksum behavior:
rg -n 'GOPROXY|GOSUMDB|GONOSUMDB|GONOPROXY|GOTOOLCHAIN|GOFIPS140' \
.github .gitlab-ci.yml .circleci .env* Dockerfile* Makefile* .
If you find affected Go versions in environments that build untrusted repositories or use less-trusted proxies:
- upgrade to
1.26.9or1.27.2immediately; - prefer the default Go module proxy and checksum database, or a proxy you operate and audit to the same standard;
- set
GOTOOLCHAIN=localon hosts where automatic toolchain download is unnecessary; - if
GOFIPS140was in use on an affected host, clear the module cache and rebuild from a trusted toolchain after the upgrade.
The minimal cache reset looks like this:
go clean -modcache
If there is any sign that an attacker-controlled proxy served toolchain content, take the stronger path: reinstall Go from a trusted release, clear caches, and rerun builds rather than trusting the existing toolchain tree.
Bottom line
CVE-2026-94444 and CVE-2026-94447 are both integrity-boundary bugs in cmd/go. One let repository-local go.sum state speak too loudly for golang.org/toolchain. The other let bundled golang.org/fips140 cache reuse happen without a trusted module zip hash anchor.
The patch set is a good example of what a real supply-chain fix looks like. It does not add vague “hardening.” It makes the trust source explicit, carries that identity through cache reuse, and adds tests that model the attacker repository and attacker proxy combination directly.
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.
References
- NVD: CVE-2026-94444
- NVD: CVE-2026-94447
- oss-security: Go 1.27.2 and Go 1.26.9 are released
- Go issue #81833: malicious GOMODPROXY can cause golang.org/fips140 checksum bypass
- Go issue #81834: malicious GOMODPROXY can cause golang.org/toolchain checksum bypass
- Go commit 1e4f1fe: bundle go.sum h1 hashes for golang.org/fips140
- Go commit 68fa769: always verify toolchain downloads with sumdb