Skip to content

Clear the stdlib and x/mod CVEs blocking the image scan gate - #464

Closed
LouisParkin wants to merge 1 commit into
stackstate-7.78.2from
gh-461-go-toolchain-cves
Closed

Clear the stdlib and x/mod CVEs blocking the image scan gate#464
LouisParkin wants to merge 1 commit into
stackstate-7.78.2from
gh-461-go-toolchain-cves

Conversation

@LouisParkin

Copy link
Copy Markdown

The scan gate reported 18 unmanaged findings (11 distinct CVEs) on the agent and
cluster-agent images, failing every build and both required CI success checks.

  • Go 1.25.13 clears seven stdlib CVEs (33818, 39821, 56853, 56858, 56859, 56860, 56862).
  • golang.org/x/mod v0.40.0 clears CVE-2026-56864 and CVE-2026-56865.
  • CVE-2026-46600 gets an exception: it is a false positive. GO-2026-5942 affects
    x/net < v0.56.0 (already pinned at v0.56.0) and the stdlib copy only from Go
    1.26.0 to 1.26.6 — below the line we build on. NVD's CPE entry has no version
    range, so Grype flags every Go under 1.26.6 while Trivy does not report it.
  • CVE-2026-18503 gets an exception: no fix in the CPython 3.13 line, same review
    date and tracking as the other embedded-interpreter findings.

Two things worth a reviewer's attention:

Only .go-version moves. GOTOOLCHAIN is derived from it and the toolchain is
fetched at build time, so the build image (currently Go 1.25.11) does not need
rebuilding. The other Go references in update_go.py already disagree with each
other upstream and are deliberately left alone.

The 239-file diff is go work sync, which CI's check-mod-tidy requires. Every
changed line in it is a golang.org/x/* version — the x/crypto, x/net, x/sync,
x/sys, x/telemetry, x/term, x/text and x/tools moves are the minimum resolution
requires for x/mod v0.40.0.

Validated locally: exceptions pass the published schema, workspace resolves
x/mod v0.40.0, go build ./cmd/trace-agent succeeds. The gate itself can only be
proven by CI here.

Note this is an argument against moving to the 1.26 line before 1.26.6, which
would turn CVE-2026-46600 into a genuine finding.

Fixes #461

The image-pipeline evaluator runs in gate mode and reported 18 unmanaged
findings (11 distinct CVEs) against both the agent and cluster-agent
images, failing every build and so both required CI success checks.

Go 1.25.13 fixes seven of them outright: CVE-2026-33818, CVE-2026-39821,
CVE-2026-56853, CVE-2026-56858, CVE-2026-56859, CVE-2026-56860 and
CVE-2026-56862 are all stdlib issues with 1.25.13 as the first fixed
release. Only .go-version moves, because GOTOOLCHAIN is derived from it
and the toolchain is fetched at build time - the build image currently
ships 1.25.11 and does not need rebuilding for this. The other Go version
references in the tree already disagree with each other upstream, so they
are left alone rather than dragged into a CVE fix.

golang.org/x/mod v0.40.0 clears CVE-2026-56864 and CVE-2026-56865. The
accompanying x/crypto, x/net, x/sync, x/sys, x/telemetry, x/term, x/text
and x/tools moves are the minimum versions module resolution requires for
it, and go work sync propagates the selection across the workspace so
that check-mod-tidy stays green. Every changed line in those 239 files is
a golang.org/x/* version.

The remaining two get dated exceptions rather than fixes:

CVE-2026-46600 is a false positive here. GO-2026-5942 affects
golang.org/x/net below v0.56.0, which go.mod already pins at v0.56.0, and
the stdlib copy only from Go 1.26.0 to 1.26.6 - below the line we build
on. The NVD CPE entry carries no version range, so Grype's CPE matcher
flags every Go release under 1.26.6 while Trivy, using the Go
vulnerability database, does not report it at all. The correction belongs
in upstream scanner data. Worth noting this is an argument against moving
to the 1.26 line before 1.26.6, which would make the finding genuine.

CVE-2026-18503 is a super-linear CPU issue in csv.Sniffer.sniff() with no
fix in the CPython 3.13 maintenance line, so it takes the same reason,
review date and STAC-25556 tracking as the other embedded-interpreter
findings on this image.

Fixes #461

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LouisParkin

Copy link
Copy Markdown
Author

Closing in favour of #463, which was opened first and solves this better.

#463 fixes what this PR excepts. Go 1.26.6 clears the seven stdlib CVEs and
CVE-2026-46600 genuinely — 1.26.6 is the fixed version for GO-2026-5942, so no
exception is needed. Python 3.13.15 clears CVE-2026-18503 the same way. Its
first run took the agent image from 18 unmanaged findings to one.

Two corrections to what this PR claimed, in case they are useful on #463:

The warning in my commit message against moving to the 1.26 line only applies
below 1.26.6. It is not an argument against #463.

The CVE-2026-18503 exception here was wrong. I read OSV's affected-versions
list, saw 3.13.14 in it, and concluded the 3.13 line had no fix. In fact
3.13.0-3.13.14 are affected and 3.13.15 is not. Worth confirming on #463 that
the built image actually reports python 3.13.15 — the single finding left on
its 06:06 run was this CVE still showing 3.13.13, before the updater repair.

@LouisParkin
LouisParkin deleted the gh-461-go-toolchain-cves branch August 18, 2026 07:49
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.

[stackstate-agent] Bump the Go toolchain to clear stdlib CVEs blocking the image scan gate

1 participant