Skip to content

Update Go to 1.24.13 to fix remaining critical vulnerability (CVE-2025-68121)#21327

Merged
geropl merged 5 commits into
mainfrom
fix/go-1.24.13-cve-2025-68121
Mar 4, 2026
Merged

Update Go to 1.24.13 to fix remaining critical vulnerability (CVE-2025-68121)#21327
geropl merged 5 commits into
mainfrom
fix/go-1.24.13-cve-2025-68121

Conversation

@geropl
Copy link
Copy Markdown
Member

@geropl geropl commented Mar 4, 2026

Fixes the remaining critical vulnerability from the build after #21326, where ide-proxy:docker still reported 1 critical finding.

Root cause

The local-app Go binaries embedded in the ide-proxy image are compiled with Go 1.24.9 (from the CI build environment), which contains CVE-2025-68121 (critical Go stdlib vulnerability, fixed in 1.24.13).

The .devcontainer/Dockerfile Go version does not affect CI — the CI uses a separate pre-built image (dev/image/Dockerfilegitpod/workspace-gitpod-dev). However, Go's toolchain directive in go.mod forces auto-download of the specified version regardless of what's installed.

Changes

  • components/local-app/go.mod: Bump toolchain from go1.24.3 to go1.24.13 — this forces the Go tool to download and use 1.24.13 in CI even though the environment has 1.24.9
  • components/ide-proxy/Dockerfile: Add apk upgrade --no-cache to match the proxy Dockerfile pattern
  • .devcontainer/Dockerfile: Bump GO_VERSION to 1.24.13 for dev environment consistency

Follow-up to #21326. Resolves: CLC-2225

@geropl geropl marked this pull request as ready for review March 4, 2026 10:52
@geropl geropl requested a review from a team as a code owner March 4, 2026 10:52
The local-app Go binaries are embedded in the ide-proxy Docker image.
They were compiled with Go 1.24.9 (from the CI environment), which
contains CVE-2025-68121 (critical Go stdlib vulnerability).

Bump the toolchain directive in local-app/go.mod to go1.24.13, which
forces the Go tool to auto-download 1.24.13 regardless of the CI
environment's installed Go version.

Also add apk upgrade to the ide-proxy Dockerfile to pick up Alpine
security patches at build time (matching the proxy Dockerfile pattern).

The .devcontainer/Dockerfile Go version bump is included for dev
environment consistency but does not affect CI builds.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl force-pushed the fix/go-1.24.13-cve-2025-68121 branch from a785ad1 to ada8491 Compare March 4, 2026 11:00
The CI image (dev/image/Dockerfile) inherits Go from the base image
gitpod/workspace-gitpod-dev, which ships Go 1.24.9. That version
contains CVE-2025-68121 (critical Go stdlib vulnerability).

Install Go 1.24.13 explicitly in the CI image so all Go binaries
built in CI use a patched toolchain. Bump TRIGGER_REBUILD to force
an image rebuild.

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl force-pushed the fix/go-1.24.13-cve-2025-68121 branch from a00035a to ef9107d Compare March 4, 2026 13:34
Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl force-pushed the fix/go-1.24.13-cve-2025-68121 branch from 20b4c34 to 1544040 Compare March 4, 2026 14:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

⚠️ Hey reviewer! BE CAREFUL ⚠️
Review the code before opening in your Gitpod. .gitpod.yml was changed and it might be harmful.

@geropl geropl merged commit 1f3fbf9 into main Mar 4, 2026
15 checks passed
@geropl geropl deleted the fix/go-1.24.13-cve-2025-68121 branch March 4, 2026 20:11
geropl added a commit that referenced this pull request Apr 23, 2026
The previous commit bumped 'toolchain go1.25.9' across all 71 go.mod
files. That worked locally but broke the existing CI dev-environment
image, which:
  1. ships golangci-lint v1.64.8 built with Go 1.24 (rejects modules
     declaring toolchain >= 1.25)
  2. has system Go 1.24.13, so GOTOOLCHAIN=auto downloads the 1.25.9
     toolchain module — but that module's prebuilt tools dir lacks
     'covdata', breaking 'go test -coverprofile' for any Go library
     package.

Instead, leave the 'toolchain' directive at go1.24.13 and rely on the
new dev-environment image (which has system Go 1.25.9 from
dev/image/Dockerfile) to compile binaries with the patched stdlib.
Once branch CI publishes the new image, a follow-up commit will update
the image tag references in .gitpod.yml and the workflow files (same
two-step pattern as #21327).

Co-authored-by: Ona <no-reply@ona.com>
geropl added a commit that referenced this pull request Apr 23, 2026
* Fix CVE-2026-27143: bump Go toolchain to 1.25.9

Daily vulnerability scan (CLC-2243) flagged 13 Classic component
images with a critical Go stdlib vulnerability:

- CVE-2026-27143 (GO-2026-4868): compiler did not correctly check
  underflow/overflow on arithmetic over induction variables in
  loops, allowing invalid indexing at runtime that could lead to
  memory corruption.

The vulnerability is fixed in Go 1.25.9 (and 1.26.2). Bump the
toolchain across the workspace:

- Set toolchain to go1.25.9 in all 71 go.mod files
- Update GO_VERSION in dev/image/Dockerfile and bump TRIGGER_REBUILD
  so the CI dev-environment image installs the patched compiler
- Update GO_VERSION in .devcontainer/Dockerfile for dev consistency

Verified locally by rebuilding all 13 affected components with
GOTOOLCHAIN=go1.25.9 and confirming grype reports zero critical
findings.

Co-authored-by: Ona <no-reply@ona.com>

* Pin golangci-lint --go=1.24 to match CI image toolchain

The CI dev-environment image bundles golangci-lint v1.64.8 built with
Go 1.24, which refuses to lint code declaring "toolchain go1.25.9".
Pin the lint target to 1.24 so the existing image keeps working without
a rebuild. We don't use any 1.25 language features; the toolchain bump
only addresses CVE-2026-27143 in the Go stdlib.

Co-authored-by: Ona <no-reply@ona.com>

* Revert toolchain bumps; rely on CI image's system Go for fix

The previous commit bumped 'toolchain go1.25.9' across all 71 go.mod
files. That worked locally but broke the existing CI dev-environment
image, which:
  1. ships golangci-lint v1.64.8 built with Go 1.24 (rejects modules
     declaring toolchain >= 1.25)
  2. has system Go 1.24.13, so GOTOOLCHAIN=auto downloads the 1.25.9
     toolchain module — but that module's prebuilt tools dir lacks
     'covdata', breaking 'go test -coverprofile' for any Go library
     package.

Instead, leave the 'toolchain' directive at go1.24.13 and rely on the
new dev-environment image (which has system Go 1.25.9 from
dev/image/Dockerfile) to compile binaries with the patched stdlib.
Once branch CI publishes the new image, a follow-up commit will update
the image tag references in .gitpod.yml and the workflow files (same
two-step pattern as #21327).

Co-authored-by: Ona <no-reply@ona.com>

* Update dev-environment image to ona-clc-2243-fix-cve-2026-27143-bump-go-gha.275

This image was published by the previous run of this PR and contains
Go 1.25.9, which is needed to compile binaries free of CVE-2026-27143.
Switching the workflow and devcontainer references over so subsequent
CI runs use the patched toolchain.

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants