Skip to content

Bump golang.org/x/mod to v0.40.0 (CVE-2026-56864, CVE-2026-56865) - #1352

Merged
ademidoff merged 1 commit into
mainfrom
chore/bump-golang-x-mod
Aug 30, 2026
Merged

Bump golang.org/x/mod to v0.40.0 (CVE-2026-56864, CVE-2026-56865)#1352
ademidoff merged 1 commit into
mainfrom
chore/bump-golang-x-mod

Conversation

@ademidoff

Copy link
Copy Markdown
Member

Problem

Trivy flags golang.org/x/mod v0.37.0 for two HIGH severity vulnerabilities:

CVE Title
CVE-2026-56864 A malicious GOSUMDB was capable of serving arbitrary module content
CVE-2026-56865 sumdb/tlog: supply chain compromise via transparency log tile verification bypass

Both are fixed in v0.40.0.

Notes on exposure

golang.org/x/mod reaches this module only through the tool directive (mvdan.cc/gofumpt, github.com/daixiang0/gci) — go mod why -m golang.org/x/mod resolves via mvdan.cc/gofumpt -> golang.org/x/mod/modfile. It is not linked into the exporter binary, so the CVEs are not runtime-exploitable here. The bump is to clear the scanner. tools/go.mod was already on v0.40.0.

Change

go get golang.org/x/mod@v0.40.0 && go mod tidy. This also pulls forward the transitive requirements:

  • golang.org/x/crypto v0.54.0 -> v0.55.0
  • golang.org/x/mod v0.37.0 -> v0.40.0
  • golang.org/x/net v0.57.0 -> v0.58.0
  • golang.org/x/text v0.40.0 -> v0.41.0
  • golang.org/x/tools v0.47.0 -> v0.49.0

No source changes; no dependencies added or removed.

Verification

  • go build ./... and go vet ./... pass.
  • govulncheck ./... no longer reports golang.org/x/mod.
  • go test ./... produces an identical set of failures on this branch and on main — all of them require the docker-compose MongoDB cluster (make test-cluster), which was not running locally.

Out of scope

govulncheck separately reports GO-2026-5764 against github.com/aws/aws-sdk-go-v2/service/s3@v1.95.1 and .../aws/protocol/eventstream@v1.7.4 (reachable via exporter/pbm_collector.go). That was not in the Trivy report this PR addresses and is left for a separate change.

golang.org/x/mod v0.37.0 is flagged for two HIGH severity issues in
sumdb: a malicious GOSUMDB could serve arbitrary module content, and
tlog tile verification could be bypassed.

The module reaches us only through the `tool` directive (gofumpt, gci),
so it is not linked into the exporter binary, but bump it to clear the
scanner. `go mod tidy` also pulls forward x/crypto, x/net, x/text and
x/tools as transitive requirements.
@ademidoff
ademidoff requested a review from a team as a code owner August 28, 2026 21:51
@ademidoff
ademidoff requested review from 4nte and JiriCtvrtka and removed request for a team August 28, 2026 21:51
@ademidoff
ademidoff merged commit c3b30fa into main Aug 30, 2026
12 checks passed
@ademidoff
ademidoff deleted the chore/bump-golang-x-mod branch August 30, 2026 10:26
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.

1 participant