Skip to content

Fix possible fix(deps): 6 vulnerable dependencies in go.mod - #12

Closed
begininvoke wants to merge 1 commit into
memcode-ai:mainfrom
begininvoke:redgem/security-fix-f8d2a6d7
Closed

begininvoke wants to merge 1 commit into
memcode-ai:mainfrom
begininvoke:redgem/security-fix-f8d2a6d7

Conversation

@begininvoke

Copy link
Copy Markdown

Proposing a fix for something flagged in go.mod. It is around line 1.

CRITICAL vulnerability in golang.org/x/crypto/ssh (installed v0.53.0, file: go.mod). CVE-2026-56854 extends the incomplete fix for CVE-2026-46595: the source-address critical option in Permissions returned by authentication callbacks was only enforced on the PublicKeyCallback and VerifiedPublicKeyCallback code paths. As a result, source-address restrictions set via Permissions.CriticalOptions by PasswordCallback, KeyboardInteractiveCallback, NoClientAuthCallback, or GSSAPIWithMICConfig.AllowLogin are silently ignored and never validated against the client's remote address. Impact: an SSH server that relies on source-address IP allowlisting with password/keyboard-interactive/none/GSSAPI authentication can be accessed by an attacker with valid credentials (or any client, in the NoClientAuth case) from any network location, defeating intended network-level access restrictions and enabling unauthorized remote access. Risk level: CRITICAL — this is an access-control bypass affecting authentication logic in a widely used SSH server library; exposure is highest for internet-facing or multi-tenant SSH servers using non-public-key auth with source-address restrictions. Remediation: upgrade to golang.org/x/crypto v0.55.0, where the source-address check is applied uniformly to Permissions returned by any authentication callback.

Updates vulnerable dependencies to versions that fix reported CVEs.

For reference: rule CVE-2026-56854. Rated critical.

I may well be missing context here — if the current code is deliberate, feel free to close this.


Found with automated scanning (RedGem) and reviewed before opening. If it is not useful, closing it is completely fine.

@memcode-ai memcode-ai 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.

Walkthrough

Updates four dependencies in go.mod (golang.org/x/image, golang.org/x/crypto, golang.org/x/text, and google.golang.org/grpc).

  • The dependency version updates were manually edited directly in go.mod rather than generated via go get or go mod tidy.
  • go.sum was left unchanged and is now out of sync with the upgraded module versions.
  • Leading tab indentation across all entries in both require blocks was stripped.

The dependency upgrades are desirable, but go.sum must be updated and formatting restored via go mod tidy before merging.


1 critical found.

Comment thread go.mod
github.com/slack-go/slack v0.27.0
github.com/spf13/cobra v1.10.2
go.yaml.in/yaml/v4 v4.0.0-rc.2
golang.org/x/image v0.45.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue · critical

Missing go.sum checksums for updated dependencies

Upgraded module versions were committed to go.mod without updating go.sum. CI and Go builds will fail checksum verification or require network access to download and update checksums.

go.mod requires golang.org/x/image v0.45.0, but go.sum only contains v0.43.0.

Fix: Run go mod tidy to regenerate valid checksums in go.sum.

@timothyerwin

Copy link
Copy Markdown
Contributor

Thanks for the report, and for saying up front that closing it was fine.

Closing this one, but the scan was useful. Details on why, in case it helps tune the tool:

The CVE does not reach us. CVE-2026-56854 is in golang.org/x/crypto/ssh, specifically source-address enforcement for Permissions returned by non-public-key auth callbacks. memcode does not import x/crypto/ssh. golang.org/x/crypto is an indirect dependency only, and govulncheck puts this in the "modules you require, but your code doesn't appear to call" bucket rather than among reachable findings.

The diff reformats go.mod. It is +92/-92 for what is a single version bump, because every line in the require blocks lost its leading tab. go get golang.org/x/crypto@v0.55.0 && go mod tidy produces a one-line diff and preserves formatting.

The title reads Fix possible fix(deps): ..., which looks like a template that expanded twice.

Running govulncheck ./... here reports 13 findings that are actually reachable from our code: ten in the standard library (resolved by building on go1.26.6), plus google.golang.org/grpc v1.82.0 and golang.org/x/text v0.38.0. We are handling those separately. Reachability is the thing worth ranking on if RedGem does not already.

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.

2 participants