[AV-142867] Fix critical issue in x/crypto via minor version upgrade from 0.17.0 to 0.52.0 - #18
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The go 1.25.0 directive likely breaks existing builds that use Go 1.21 (e.g., the provided Dockerfile) and should be aligned or separated from the dependency-only security upgrade.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the module dependency set to remediate reported security vulnerabilities in transitive SSH-related packages by upgrading golang.org/x/crypto (and associated x/* modules) to newer versions.
Changes:
- Upgraded
golang.org/x/cryptofromv0.17.0tov0.52.0(indirect), along with relatedgolang.org/x/net,golang.org/x/sys, andgolang.org/x/textversions. - Updated
go.sumto reflect the new module versions and checksums. - Bumped the
godirective ingo.modtogo 1.25.0(not mentioned in the PR description, and may conflict with existing build tooling).
File summaries
| File | Description |
|---|---|
| go.mod | Updates go directive and upgrades golang.org/x/* indirect requirements. |
| go.sum | Refreshes checksums for upgraded golang.org/x/* module versions. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| module github.com/couchbasecloud/vault-plugin-database-couchbasecapella | ||
|
|
||
| go 1.21.3 | ||
| go 1.25.0 |
There was a problem hiding this comment.
Good catch on the Dockerfile — fixed in 277a6c9, which bumps the builder stage to golang:1.25.
Taking the opposite route to the one suggested, though, because pinning the go directive back to 1.21.3 would break the build rather than fix it. The go 1.25.0 bump isn't a discretionary toolchain change — every module in this PR declares it:
| Module | go directive in its own go.mod |
|---|---|
golang.org/x/crypto@v0.52.0 |
go 1.25.0 |
golang.org/x/net@v0.54.0 |
go 1.25.0 |
golang.org/x/sys@v0.45.0 |
go 1.25.0 |
golang.org/x/text@v0.37.0 |
go 1.25.0 |
Keeping go 1.21.3 would fail with a "module requires go >= 1.25.0" error.
Staying on Go 1.21 isn't a useful alternative either. The newest x/crypto that still supports it is v0.33.0 (v0.34.0 moves to go 1.23.0), and per OSV that leaves ~37 of the 39 known advisories in place, versus 4 at v0.52.0.
So the toolchain bump is the price of the remediation, and the Dockerfile needed to move with it.
The x/crypto, x/net, x/sys and x/text versions in this PR each declare 'go 1.25.0' in their own go.mod, which is why go.mod moved from go 1.21.3 to go 1.25.0. The builder stage was still pinned to golang:1.21 and would fail to build the plugin. Raised by the Copilot review on PR #18. Note its suggestion to revert the go directive instead is not viable: x/crypto v0.52.0 requires go >= 1.25.0, and the newest x/crypto usable on Go 1.21 is v0.33.0, which leaves ~37 of the 39 known advisories unresolved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
It includes a Go toolchain bump and large transitive golang.org/x/* upgrades that should be validated in the full build/release environment before approval.
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Superseded by #20, which consolidates this PR with its sibling. #18 (x/crypto) and #19 (x/net) both edit #20 takes both bumps together, at higher versions than either PR proposed:
It also carries the Closing this one. No work is lost — AV-142867 and AV-142868 both remain open and are linked from #20. |
Jira
Description
Upgrade golang.org/x/crypto to fix critical SSH security vulnerabilities: authorization bypass, resource exhaustion DoS, FIDO key verification bypass, integer overflow, and certificate revocation bypass.
✅ 10 CVEs resolved by this upgrade, including 10 critical 🚨 CVEs
This PR will resolve the following CVEs:
Pull Request Category
Testing Approach
How was this change tested and do you have evidence?
cbclocal🔗 Related Tasks