Skip to content

upgrade Go toolchain to 1.26.10 (CVE-2026-111943) - #3

Merged
TechnoFinch merged 4 commits into
masterfrom
sec-3320-go-patch
Oct 23, 2026
Merged

TechnoFinch merged 4 commits into
masterfrom
sec-3320-go-patch

Conversation

@TechnoFinch

@TechnoFinch TechnoFinch commented Oct 20, 2026 •

Copy link
Copy Markdown

CVE-2026-111943 Go toolchain patch.

Version change

Go 1.21 / 1.21.5 / 1.21.x / golang:alpine (floating) -> 1.26.10. Go 1.26.10 adds the hard-coded crypto/x509 blocklist for 8 eMudhra/emSign intermediates. Go 1.25 and older get no fix.

Files changed

  • Dockerfile: builder golang:1.21.5 -> golang:1.26.10-alpine3.23. Runtime stage is still scratch, with the CA bundle (ca-certificates 20261020-r0) copied from the builder stage, so linux/amd64, arm64 and mips64 builds all keep working. CGO_ENABLED=0.
  • tilt.Dockerfile: alpine:3.23 + apk add ca-certificates (local Tilt dev image only).
  • test/kind-with-registry.sh: local registry registry:2 (Alpine 3.18, EOL) -> registry:3 (Alpine 3.24).
  • .github/workflows/ci.yml, docker.yml, release.yml: setup-go go-version 1.21 / 1.21.x -> 1.26.10. Every uses: in these files is now pinned to a full commit SHA, with the original tag as a comment. The action versions are unchanged; this satisfies the org scanner's pinning rule.
  • go.mod / go.sum: added toolchain go1.26.10. Dependency bumps for critical/high advisories only, each to the minimum version that fixes them:
    • github.com/coredns/coredns v1.11.3 -> v1.14.7 (several HIGH advisories; v1.14.7 is the minimum that fixes all of them)
    • google.golang.org/grpc v1.63.2 -> v1.83.2 (HIGH)
    • golang.org/x/crypto v0.22.0 -> v0.55.0, golang.org/x/net -> v0.58.0, golang.org/x/oauth2 -> v0.36.0, quic-go -> v0.61.0 (CRITICAL/HIGH; the final versions are the ones coredns/grpc require)
    • k8s.io/{api,apimachinery,client-go} v0.29.3 -> v0.35.4, miekg/dns v1.1.58 -> v1.1.72, plus many indirect deps (DataDog, AWS SDK v2, otel). These were pulled in by coredns v1.14.7 through MVS.
    • The go line went from 1.21 to 1.25.0. coredns v1.14.7 requires go >= 1.25, so this was forced. go mod tidy set it.

Local build/test

  • go build ./... && go vet ./... && go test ./... with GOTOOLCHAIN=go1.26.10: pass
  • docker build .: pass. The image reports CoreDNS-1.14.7+k8s_gateway-0.4.0 ... go1.26.10, and -plugins lists k8s_gateway.
  • vulngate: exit 0. No fixable critical/high left. The remaining medium/low/unknown findings are non-blocking and were left alone on purpose.

Impact assessment

Downtime risk: MEDIUM. The toolchain bump alone is low risk, but the critical/high vuln fixes force a big jump in the embedded CoreDNS (1.11.3 -> 1.14.7) and client-go (0.29 -> 0.35). The go line also moves 1.21 -> 1.25, which changes GODEBUG defaults. For example: TLS 3DES/RSA key exchange removed by default, x509 negative serial numbers rejected, x509usefallbackroots/asynctimerchan behaviour, and HTTP/2 / ServeMux pattern changes. All of these only matter if the matching plugin/feature is in use.

  • CoreDNS 1.11 -> 1.14: the plugin set and directive order come from upstream (dnsserver.Directives), so new upstream plugins are compiled in. Corefile syntax for the plugins we use (k8s_gateway, forward, cache, etc.) should be unchanged, but validate the deployed Corefile in staging before rolling to prod.
  • client-go 0.35 talks to any Kubernetes API server within the supported skew. RBAC needs are unchanged (Gateway API / Ingress / Service watches).
  • CI lint: golangci-lint v1.54.2 (pinned in ci.yml) predates Go 1.26 and will probably fail to load the 1.26 stdlib. The lint job may go red and need a separate golangci-lint upgrade. Unit tests are unaffected.
  • Min OS: Go 1.26 needs Linux kernel >= 3.2. The release also builds freebsd/mips64 via goreleaser, which is still supported.

Cert exposure: none found. No emSign/eMudhra references, no custom CertPool / RootCAs / SSL_CERT_FILE in this repo. Outbound TLS only happens if a Corefile turns on bundled CoreDNS plugins (e.g. forward tls://, route53/clouddns/azure), and those talk to public cloud / DoT endpoints that don't chain through emSign. Kubernetes API TLS uses the in-cluster SA CA.

Deploy path: a multi-arch container image (make docker / make release to quay.io) via the docker/release workflows, plus goreleaser binaries on tags, plus a Helm chart in charts/. The binary is static (CGO_ENABLED=0) and the runtime stays scratch. CoreDNS is a stateless DNS server, so a rolling update with >= 2 replicas is safe. Watch DNS resolution during the rollout.

The fix only takes effect after the image is rebuilt AND redeployed.

Known remaining vulnerabilities

None at critical/high. Medium/low/unknown advisories are left on purpose (out of scope).


Note

Medium Risk
Large transitive bumps (CoreDNS 1.11→1.14, client-go 0.29→0.35) and Go 1.25+ behavior changes can affect DNS plugin behavior and cluster API compatibility; rollout should be validated in staging despite minimal first-party code changes.

Overview
Upgrades the project to Go 1.26.10 (with toolchain in go.mod) to address CVE-2026-111943, and refreshes CoreDNS (v1.14.7), client-go / k8s libs (v0.35.4), and related indirect dependencies via go.mod / go.sum.

Build & CI: The main Dockerfile now builds on golang:1.26.10-alpine, drops the Debian runtime stage, and copies the Alpine CA bundle into the existing scratch image. GitHub Actions workflows use Go 1.26.10, pin third-party actions to commit SHAs, bump golangci-lint to v2.15.0 (action v9.3.0), and set cache: false on release setup-go steps. tilt.Dockerfile switches to Alpine for certs; the kind test helper uses registry:3.

Code: Informer ListWatch hooks in kubernetes.go are migrated to ListWithContextFunc / WatchFuncWithContext for the newer client-go API. A one-line error-string casing fix in gateway.go satisfies lint.

Reviewed by Cursor Bugbot for commit 2f454c4. Bugbot is set up for automated code reviews on this repo. Configure here.

@broly-code-security-scanner

broly-code-security-scanner Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Broly Security Scan

Caution

⚠️ Container scan did not complete for tilt.Dockerfile image alpine:3.23.
⚠️ Container scan did not complete for Dockerfile image docker.io/library/golang:1.26.10-alpine3.23.

Note

Summary

16 actionable finding(s) in this PR

  • 🟡 16 medium

Main table: 4 shown, 12 omitted of 16 actionable finding(s) above the reporting threshold. See the repository Security tab for the full set.

No finding is at or above high, so this check is not blocking. The findings above are still tracked and reported.

Severity Scanner Issue Location Dismiss Verdict
🟡 MEDIUM SCA GO-2026-5932: golang.org/x/crypto@0.56.0 go.mod:1 d23 🔺 TRUE_POSITIVE · Confidence: low
🟡 MEDIUM SCA golang.org/x/mod@0.38.0 — 2 vulnerabilities
(worst: GO-2026-6179)
→ fixed in 0.40.0
go.mod:1 d18 🔺 TRUE_POSITIVE · Confidence: HIGH
🟡 MEDIUM SCA golang.org/x/net@0.58.0 — 5 vulnerabilities
(worst: GO-2026-6603)
→ fixed in 0.60.0
go.mod:1 d17 🔺 TRUE_POSITIVE · Confidence: HIGH
🟡 MEDIUM DOCKERFILE Container runs as root; no USER directive is
present.
tilt.Dockerfile:1 d24 🔺 TRUE_POSITIVE · Confidence: HIGH

Dismiss false positives

Tick a box to dismiss the finding; untick it to bring the finding back. That is the same as replying /broly dismiss d1 and /broly undismiss d1. To record why it is a false positive, reply with /broly dismiss d1: your reason instead — Broly reuses those reasons to triage similar findings across the org.

  • d5 · 🟡 MEDIUM   · .github/workflows/ci.yml:18 · credential persistence through GitHub Actions artifacts
  • d6 · 🟡 MEDIUM   · .github/workflows/ci.yml:32 · credential persistence through GitHub Actions artifacts
  • d7 · 🟡 MEDIUM   · .github/workflows/ci.yml:1 · overly broad permissions
  • d19 · 🟡 MEDIUM   · .github/workflows/ci.yml:12 · overly broad permissions
  • d9 · 🟡 MEDIUM   · .github/workflows/ci.yml:26 · overly broad permissions
  • d10 · 🟡 MEDIUM   · .github/workflows/docker.yml:12 · credential persistence through GitHub Actions artifacts
  • d11 · 🟡 MEDIUM   · .github/workflows/docker.yml:8 · overly broad permissions
  • d12 · 🟡 MEDIUM   · .github/workflows/release.yml:13 · credential persistence through GitHub Actions artifacts
  • d13 · 🟡 MEDIUM   · .github/workflows/release.yml:35 · credential persistence through GitHub Actions artifacts
  • d20 · 🟡 MEDIUM   · .github/workflows/release.yml:1 · overly broad permissions
  • d21 · 🟡 MEDIUM   · .github/workflows/release.yml:9 · overly broad permissions
  • d22 · 🟡 MEDIUM   · .github/workflows/release.yml:31 · overly broad permissions
  • d23 · 🟡 MEDIUM   · go.mod:1 · GO-2026-5932: golang.org/x/crypto@0.56.0
  • d17 · 🟡 MEDIUM   · go.mod:1 · golang.org/x/net@0.58.0 — 5 vulnerabilities (worst: GO-2026-6603)
  • d18 · 🟡 MEDIUM   · go.mod:1 · golang.org/x/mod@0.38.0 — 2 vulnerabilities (worst: GO-2026-6179)
  • d24 · 🟡 MEDIUM   · tilt.Dockerfile:1 · Container runs as root; no USER directive is present.

Note

Re-scan this PR anytime with /broly scan — useful after /broly undismiss, or to refresh findings without a new push.

Broly — SAST (GLM-5.3-Flash) · Secrets · SCA · IaC · GH Actions · Base Images · Supply Chain Threats · Attack Hypotheses · Adversarial Verification

We're continuously improving Broly's accuracy and finding quality — your feedback is valuable. False positives, missed findings, bugs, and feature requests all welcome.

Ask in #security-engineering   Powered by Together AI

Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/ci.yml Outdated
@TechnoFinch

Copy link
Copy Markdown
Author

SEC-3320 verify: bumped golangci-lint to v2.15.0 (action v9.3.0, SHA-pinned) since v1.54.2 can't typecheck Go 1.26, and bumped go.etcd.io/etcd/client/pkg/v3 to v3.6.14 (GO-2026-6107, HIGH).

@TechnoFinch TechnoFinch changed the title SEC-3320: upgrade Go toolchain to 1.26.10 (CVE-2026-111943) upgrade Go toolchain to 1.26.10 (CVE-2026-111943) Oct 21, 2026
…ine 3.23 builder and scratch/alpine runtime images; disable setup-go cache in release workflow; fix staticcheck findings

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit afdd59f. Configure here.

Comment thread Dockerfile Outdated
FROM scratch

COPY --from=0 /etc/ssl/certs /etc/ssl/certs
COPY --from=docker.io/library/alpine:3.23 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Broken CA copy for multi-arch

High Severity

The runtime stage copies ca-certificates.crt from alpine:3.23 without pinning the source platform. Official alpine:3.23 has no linux/mips64 variant, so make docker and make release fail on the existing linux/amd64,linux/arm64,linux/mips64 matrix. The previous COPY --from=0 used the BUILDPLATFORM builder image and worked for every target.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit afdd59f. Configure here.

…3 builder stage (keeps linux/mips64 builds working); kind test registry image moved to registry:3 (Alpine 3.24)
@TechnoFinch
TechnoFinch merged commit ae5bb61 into master Oct 23, 2026
5 checks passed
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.

3 participants