CryptoApplication · Golang

CVE-2026-39828

MEDIUM · 6.3 CVSS v3.1 Published 2026-05-22
Fix available
A fix is available. Upgrade to 0.52.0 or later.
See remediation →
69/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
When an SSH server authentication callback returned PartialSuccessError with non-nil Permissions, those permissions were silently discarded, potentially dropping certificate restrictions such as force-command after a second factor succeeded. Returning non-nil Permissions with PartialSuccessError now results in a connection error.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

In SSH server authentication, when a callback returned PartialSuccessError with non-nil Permissions, those permissions were silently discarded. This could drop certificate restrictions like force-command after a second authentication factor succeeded, potentially allowing attackers to bypass command restrictions. The fix now errors on connection if non-nil Permissions are returned with PartialSuccessError.

MitigationUpgrade to the patched version of the SSH server library (golang.org/x/crypto/ssh) that validates Permissions are nil when PartialSuccessError is returned. Review authentication callbacks to ensure they comply with the expected behavior.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
CryptoApplication
Affected:< 0.52.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify golang.org/x/crypto version
    Run 'go list -m golang.org/x/crypto' or inspect the go.mod file to find the version of golang.org/x/crypto being used
    Affected if The version is below 0.52.0 (e.g., 0.51.0, 0.50.0, etc.)
  2. Locate SSH server authentication callbacks
    Search the codebase for custom implementations of ServerAuthCallback or UserAuthCallback handlers, typically passed to ssh.ServerConfig
    Affected if Custom authentication callback functions are defined and registered with the SSH server configuration
  3. Find PartialSuccessError usage
    Search for references to 'PartialSuccessError' in the authentication callback code, often imported from golang.org/x/crypto/ssh
    Affected if The code contains PartialSuccessError constructor calls within authentication logic
  4. Check Permissions field in PartialSuccessError returns
    Examine any PartialSuccessError instantiation to see if a non-nil Permissions struct is passed as the second argument (e.g., PartialSuccessError(permissions)), and review if these permissions contain restrictions like ForceCommand, CriticalOptions, or SourceAddress
    Affected if PartialSuccessError is returned with a non-nil Permissions argument containing certificate restrictions

You are affected if golang.org/x/crypto version is below 0.52.0 AND your SSH server implements custom authentication callbacks that return PartialSuccessError with non-nil Permissions, as those restrictions would have been silently dropped.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 0.52.0 or later
Fixed in 0.52.0
Interim mitigation

Upgrade to the patched version of the SSH server library (golang.org/x/crypto/ssh) that validates Permissions are nil when PartialSuccessError is returned. Review authentication callbacks to ensure they comply with the expected behavior.

Recommended fix High confidence

golang.org/x/crypto v0.52.0

  1. Identify all uses of golang.org/x/crypto/ssh in your project that handle PartialSuccessError in authentication callbacks
  2. Review code to check if any PartialSuccessError returns include non-nil Permissions
  3. If non-nil Permissions are returned with PartialSuccessError, refactor the authentication logic to either return nil Permissions or handle the two-factor flow differently
  4. Update the dependency to golang.org/x/crypto version v0.52.0 or later using: go get golang.org/x/[email protected]
  5. Run tests to verify authentication behavior works as expected, especially multi-factor authentication flows
  6. Redeploy the updated application
Caveat Code that returns non-nil Permissions with PartialSuccessError will now receive a connection error instead of silently dropping permissions - refactoring of authentication callbacks may be required

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Crypto Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing6.0 h
  • Review / QA3.0 h
18.0 hours of engineering $3,120
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,992.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-39828 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-39828 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data