Skip to content

Fix: Bump golang.org/x/net to v0.62.0 for CVE-2026-78661 - #936

Merged
boazdavid merged 1 commit into
mainfrom
fix/bump-x-net
Nov 8, 2026
Merged

boazdavid merged 1 commit into
mainfrom
fix/bump-x-net

Conversation

@boazdavid

Copy link
Copy Markdown
Collaborator

Why

Trivy fails the CI trivy job on every PR, and it will fail on main at its next run:

  • golang.org/x/net v0.60.0, CVE-2026-78661, severity HIGH, fixed in v0.62.0. A denial of service in golang.org/x/net/html.
  • main passed on 2026-11-06. The vulnerability database updated after that.

What

  • go get golang.org/x/[email protected] and go mod tidy. Only go.mod and go.sum change.
  • x/net is an indirect dependency: the proxy imports otlptracehttp, which imports grpc, which imports x/net/trace. Nothing in this repo imports x/net/html, so the code probably does not reach the vulnerable function. Trivy scans the module list and does not look at the call graph.
  • The bump moves four more modules, because x/net v0.62.0 requires them: x/crypto v0.57.0 to v0.58.0, x/sync v0.23.0 to v0.24.0, x/sys v0.48.0 to v0.49.0, x/text v0.42.0 to v0.43.0.

Tests

go build ./..., go vet ./... and go test ./... give the same results as main:

  • Pass: every package, except the ones below.
  • Fail on main too, on a macOS laptop: TestRateFillTableAndPrice (a float-rounding test), four install and settings tests in context-guru-plugin, TestPreflight* (macOS bash 3.2), and the save-more goldens when ANTHROPIC_* variables are set in the shell. None of them touch x/net.
  • Timing tests (TestALateFirstByte*, TestDashboardAddsNoRequestLatency*) depend on machine load. CI is the reference for them.

Assisted-By: Claude (Anthropic AI) [email protected]

Trivy fails the build on a HIGH finding with a fix: a denial of service in
golang.org/x/net/html, fixed in v0.62.0. x/net is an indirect dependency
(proxy -> otlptracehttp -> grpc -> x/net/trace); nothing imports x/net/html.
go get also moved x/crypto to v0.58.0, x/sync to v0.24.0, x/sys to v0.49.0
and x/text to v0.43.0, which x/net v0.62.0 requires.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session fresh 1 of 2 1 of 2 a7d8161299b3 approve

Verdict: approve

Findings

None. I found no defect in this PR.

Non-blocking

  • Verification limit. Go is not installed on this machine, and web search failed in this session. So I could not compile, run go mod verify, or read the advisory for CVE-2026-78661. The claim "fixed in v0.62.0" comes from the commit message and the Trivy gate, not from an external source I could read. The CI build and the Trivy job (.github/workflows/ci.yaml:167) will confirm both within the pipeline.
  • Side-effect bumps touch directly used packages. go get golang.org/x/[email protected] also moved x/crypto to v0.58.0 and x/sync to v0.24.0. This repo uses them directly: x/crypto/argon2 in tenant/password.go:11 and x/sync/singleflight in proxy/proxy.go:53 and components/offload/extract_llm.go:13. The commit message names these moves, and both are patch-level bumps in stable packages. I expect no behavior change, but the release suite is the real check.
  • x/net is not imported by any file in this repo. The commit message says the same: x/net is linked only through otlptracehttp → grpc. The fix therefore matters for the Trivy gate, not for code this repo owns.

What I checked

  • Read CLAUDE.md and docs/design.md for the repo rules.
  • Read the full diff (git diff 363f0f1e..HEAD). It changes go.mod (10 lines) and go.sum (24 lines) only. One commit, a7d81612, signed off (Signed-off-by) and attributed (Assisted-By:), conventional-commit title. All per the commit rules in CLAUDE.md.
  • Version coherence. Every bumped module in go.mod (x/net v0.62.0, x/crypto v0.58.0, x/sync v0.24.0, x/sys v0.49.0, x/text v0.43.0) has both an h1: and a /go.mod line in go.sum. The old versions (v0.60.0, v0.57.0, v0.23.0, v0.48.0, v0.42.0, x/tools v0.50.0) are gone from go.sum. x/tools v0.51.0 appears in go.sum only, which is correct for an indirect module-graph entry.
  • Scope of the bump. Grepped every *.go file: nothing imports golang.org/x/net. Direct use of the companion bumps is limited to argon2 and singleflight as listed above. No vendor directory, no second go.mod, and no CI or deploy file pins an x/ version, so nothing else needed the same bump.
  • The Trivy claim. .github/workflows/ci.yaml:167-177 runs a filesystem scan with severity: CRITICAL,HIGH, exit-code: 1, and ignore-unfixed: true. This matches the commit message: a HIGH finding with a fix fails the build, and the bump is the fix path.
  • Rules from CLAUDE.md. No behavior change for users: no source file changed, and the bumped packages are not behavior-relevant to the proxy beyond what CI tests. No data-dependence change, so docs/data-dependence.md needs no row update.
  • Limits I could not cover: no compile, no tests, no go mod verify, no external advisory lookup (Go not installed; web search unavailable). I state this here because the review instructions ask for it, not because I found a defect in it.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session fresh 2 of 2 1 of 2 a7d8161299b3 approve

Verdict: approve

Findings

None.

Non-blocking

  • PR body (Why / What) — the bump moves five modules in go.sum, not four.

    • The body lists x/crypto, x/sync, x/sys, x/text. The diff also moves golang.org/x/tools v0.50.0 → v0.51.0 (go.sum:205-206).
    • x/text v0.43.0 requires x/tools v0.51.0, so go get golang.org/x/[email protected] pulls it. It stays out of go.mod because nothing imports it. The hashes match the checksum database. So the change itself is correct and expected. Only the count in the description is wrong.
    • Fix: add x/tools v0.51.0 to the list in the PR body.
  • PR body (Why) — the import chain "otlptracehttp, which imports grpc, which imports x/net/trace" is wrong at the first link.

    • otlptracehttp v1.47.0 does not import grpc. I read the import block of client.go at that tag. It uses net/http and protobuf only.
    • x/net enters the module graph through github.com/maximhq/bifrost/core v1.7.0, whose go.mod requires x/net as an indirect dependency.
    • The conclusion still holds. No file in this repo imports any golang.org/x/net package. The vulnerable package x/net/html is not reached from this repo's code.
    • Fix: correct the sentence in the PR body, or drop it. Trivy scans the module list either way.

What I checked

  • The diff touches only go.mod and go.sum. Six version pairs change: x/net v0.62.0, x/crypto v0.58.0, x/sync v0.24.0, x/sys v0.49.0, x/text v0.43.0, x/tools v0.51.0.
  • All 12 new go.sum hashes match sum.golang.org. Go is not installed here, so these lookups stand in for go mod verify on the changed entries. Every hash matched.
  • The dependency state is what go get golang.org/x/[email protected] plus go mod tidy produces:
    • x/net v0.62.0 requires x/crypto v0.58.0, x/sys v0.49.0, x/text v0.43.0 (verified from its published go.mod).
    • x/text v0.43.0 requires x/tools v0.51.0 and x/sync v0.24.0.
    • x/term v0.47.0 is required by x/net's go.mod but has no go.sum entry. That is correct. No package of it is imported, and graph pruning needs no hash for it. The same held before the bump.
  • The CVE is real. NVD lists CVE-2026-78661: a denial of service in golang.org/x/net/html, O(n²) text coalescing in addText/fosterParent, severity HIGH, fixed in v0.62.0. The fix commit 4af4fce (2026-10-20) is in the v0.61.0...v0.62.0 compare on golang/net.
  • The Trivy claim matches CI. .github/workflows/ci.yaml:167 runs a filesystem scan with severity: CRITICAL,HIGH and exit-code: '1'. A HIGH finding with a fix fails the job.
  • Reach of the vulnerable code: I grepped every .go file in the repo. No file imports golang.org/x/net. So no repo code reaches x/net/html.
  • Risk of the other bumps for directly imported packages:
    • x/crypto/argon2 (tenant/password.go): v0.58.0 adds a loong64 assembly speedup. No output change, and not on this platform.
    • x/sync (proxy/proxy.go, components/offload/extract_llm.go, dash/*): v0.24.0 is one errgroup cleanup commit. No semantic change. singleflight is unchanged.
  • Toolchain: go.mod says go 1.26.4. x/net v0.62.0 needs go 1.26.0. The Dockerfile builds with golang:1.26. Compatible.
  • No other file needed an update. The repo has one go.mod. THIRD-PARTY-NOTICES does not pin module versions.
  • Repo rules: the PR changes no feature, so no data-dependence row is due. The PR is authored by the human owner, so the behavior-change permission rule is satisfied by authorship. The change and its reason are named at the top of the PR body.
  • Limits: I did not run go build, go vet, or go test — live tests are not approved and Go is not installed. I did not verify the CI runs or the Trivy database update date. WebSearch failed in this session; I used NVD, the Go module proxy, the checksum database, and GitHub compares instead.
  • Per the round 1 rule, I did not read the PR comments or the other review before posting this.

@boazdavid
boazdavid merged commit f43d9fa into main Nov 8, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant