Skip to content

Bump golang.org/x/text to v0.41.0 (CVE-2026-56851, CVE-2026-56852) - #129

Closed
nthmost-orkes wants to merge 2 commits into
mainfrom
fix/cve-x-text
Closed

nthmost-orkes wants to merge 2 commits into
mainfrom
fix/cve-x-text

Conversation

@nthmost-orkes

Copy link
Copy Markdown
Contributor

Closes #128.

Both high-severity CVEs flagged in the 3.34.0 scan are in the same indirect dependency, golang.org/x/text, so one bump clears both:

  • CVE-2026-56851 -- DoS via out-of-bounds slice error in the Nickname profile (fix: 0.41.0)
  • CVE-2026-56852 -- DoS via invalid UTF-8 input (fix: 0.39.0)

0.41.0 is the higher of the two fix floors, so that's the target.

What changed

  • go.mod / go.sum: golang.org/x/text v0.14.0 -> v0.41.0.
  • go directive: 1.23 -> 1.25.0. This is required by the fix -- x/text v0.41.0 itself declares go 1.25.0, so the module minimum has to move with it. No toolchain line was added.
  • cmd/workflow.go: fmt.Errorf(message) -> errors.New(message).

Why the cmd/workflow.go change rides along

Raising the go directive to 1.25 enables the stricter printf vet analyzer, which go test runs as part of the build. It flagged a pre-existing non-constant format string at cmd/workflow.go:620 -- an error string assembled from server-supplied validation messages, which can legitimately contain %. Left as-is, go test ./... fails to build under the new directive. errors.New is the correct call for a pre-formatted string and keeps CI green. It's a latent correctness fix too (a % in a validation message would previously have produced a garbled error).

Verified: go build ./... and go test ./... both pass.

Fixes two high-severity DoS CVEs in the indirect golang.org/x/text
dependency (out-of-bounds slice in the Nickname profile, and invalid
UTF-8 handling). v0.41.0 is the fix floor for CVE-2026-56851.

x/text v0.41.0 declares 'go 1.25.0', which raises the module's go
directive and enables the stricter printf analyzer. That flagged a
pre-existing non-constant format string in cmd/workflow.go (an error
built from server-supplied validation messages that can contain '%');
switched it to errors.New to keep 'go test' / vet green.
@nthmost-orkes

Copy link
Copy Markdown
Contributor Author

Closing as redundant. #127 already landed the same golang.org/x/text v0.41.0 bump (same go 1.25.0 directive bump and the same cmd/workflow.go format-string fix) on main, so this branch now has an empty diff against main. CVE-2026-56851 and CVE-2026-56852 are resolved by #127.

@nthmost-orkes
nthmost-orkes deleted the fix/cve-x-text branch November 20, 2026 02:57
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.

CVE remediation: golang.org/x/text DoS (3.34.0 scan)

1 participant