Skip to main content

golang.org/x/crypto EUVDEUVD-2026-31394

| CVE-2026-39828 MEDIUM
Improper Certificate Validation (CWE-295)
2026-05-22 Go GHSA-45gg-vh54-h5m9
6.3
CVSS 3.1 · Vendor: Go
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain valid first-factor SSH credentials
  2. Delivery
    Connect to target Go SSH server running vulnerable golang.org/x/crypto/ssh
  3. Exploit
    Authenticate first factor, triggering PartialSuccessError with certificate Permissions silently discarded
  4. Execution
    Complete second-factor authentication
  5. Persist
    Receive SSH session with certificate restrictions (e.g., force-command) absent
  6. Impact
    Execute arbitrary commands beyond intended access scope

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
Exploitation Conditions

Exploitation requires all of the following to be true simultaneously: (1) the SSH server is built using golang.org/x/crypto/ssh at a version below 0.52.0; (2) the server implements multi-factor authentication using the PartialSuccessError mechanism; (3) the server's authentication callback returns non-nil Permissions alongside PartialSuccessError during the MFA sequence; (4) the attacker possesses valid first-factor credentials (CVSS PR:L confirms authentication is required). Exploitation is limited by the attacker needing prior authenticated access, and by the vulnerability only materializing when certificate Permissions are the enforced access control boundary. Servers not using MFA, not using certificate-based permission restrictions, or not affected by the version range are not vulnerable. SSVC confirms the attack is not automatable, further constraining realistic exploitation scenarios.

Impact

The CVSS 6.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L) reflects a network-reachable flaw requiring low privileges - the attacker must possess valid first-factor credentials. Real-world risk is meaningfully lower than CVSS alone suggests: EPSS is 0.01% (3rd percentile), SSVC marks exploitation as none and automatable as no, there is no CISA KEV listing, and no public exploit code has been identified. The vulnerability is only exploitable on Go-based SSH servers that simultaneously implement MFA via PartialSuccessError AND rely on certificate-embedded Permissions for access control - a configuration intersection that narrows the exposed population considerably. The practical impact is integrity-focused: a user who should be constrained to a forced command could gain unconstrained shell access. Confidentiality and availability impacts are secondary. This is a real but niche risk, appropriately prioritized below critical or high-CVSS-but-widely-deployed issues.

Exploit ScenarioDerived

An attacker holds valid SSH credentials for an account whose SSH certificate carries a force-command restriction limiting them to a specific command (e.g., a restricted shell or backup script). The target server is a Go application using golang.org/x/crypto/ssh with MFA configured: the server's authentication callback returns PartialSuccessError with the certificate Permissions on first-factor success. Because those Permissions are silently dropped, after the attacker completes the second factor, they receive an unrestricted shell session rather than the constrained one their certificate mandated. No public exploit code identified at time of analysis, but the attack is conceptually straightforward given knowledge of the MFA flow.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 02, 2026

SSH certificate permission enforcement in golang.org/x/crypto/ssh fails silently during multi-factor authentication flows, allowing authenticated users to bypass certificate-enforced restrictions such as force-command. Specifically, when an SSH server authentication callback returns PartialSuccessError with non-nil Permissions (as occurs in MFA sequences where a first factor succeeds and a second is required), those certificate permissions are silently discarded rather than propagated to the final session. Any Go-based SSH server using this library with both MFA and certificate-based permission restrictions is affected in versions prior to 0.52.0. No public exploit identified at time of analysis, and CISA KEV does not list this vulnerability.

RemediationAI

Upgrade golang.org/x/crypto to version 0.52.0 or later, which resolves the silent permission discard by returning a connection error when non-nil Permissions are passed with PartialSuccessError - see the upstream change at go.dev/cl/781621 and the Go vulnerability database entry at pkg.go.dev/vuln/GO-2026-5014. The fix is a breaking behavioral change: server implementations that previously returned non-nil Permissions alongside PartialSuccessError will now see connections fail, requiring code review of custom authentication callbacks. If immediate patching is not feasible, a compensating control is to audit all SSH server authentication callback implementations and ensure PartialSuccessError is returned with nil Permissions, deferring permission assignment to the final successful authentication stage - note this workaround requires code changes and careful testing to avoid introducing logic errors in permission assignment. Do not rely on network-layer filtering alone, as the vulnerability is exploitable by users who already hold valid first-factor credentials.

Affected VersionsENISA

golang.org/x/crypto/ssh 0 <0.52.0

Affected Packages

go golang.org/x/crypto fix: 0.52.0
go golang.org/x/crypto/ssh fix: 0.52.0
euvd golang_org_x_crypto_ssh fix: 0.52.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is golang.org/x/crypto/ssh (CPE: cpe:2.3:a:golang.org/x/crypto:golang.org/x/crypto/ssh:*:*:*:*:*:*:*:*), Go's extended cryptography library providing SSH protocol support. The SSH certificate model allows embedding permissions and extensions - such as force-command, which constrains the commands an authenticated user may execute - directly into certificates. In multi-factor authentication implementations, the PartialSuccessError type signals to the SSH handshake engine that the first authentication factor succeeded and a second is required. The bug (CWE-295: Improper Certificate Validation) is that the handshake engine silently discards the Permissions struct carried in a PartialSuccessError return value rather than propagating it into the final authenticated session context. The fix, introduced in 0.52.0, converts this silent discard into a connection error, forcing implementers to handle the condition correctly. The issue is tracked at go.dev/issue/79562 and announced via golang-announce.

Know when Golang Org X Crypto Ssh gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Go) PRIMARY 6.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
SUSE MEDIUM
Red Hat 8.8 HIGH

Primary rating from Vendor (Go).

CVSS VectorVendor: Go

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

Lifecycle Timeline

3
CVSS changed
Jun 02, 2026 - 16:37 NVD
6.3 (None) 6.3 (MEDIUM)
Patch available
May 22, 2026 - 04:31 EUVD
CVE Published
May 22, 2026 - 02:31 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for HPC 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP6-LTSS Affected

References

Advisories & patches
ADVISORY https://vuldb.com/vuln/365124 REF https://access.redhat.com/errata/RHSA-2026:26546 REF https://access.redhat.com/errata/RHSA-2026:26547 REF https://access.redhat.com/errata/RHSA-2026:36105 REF https://access.redhat.com/errata/RHSA-2026:36167 REF https://access.redhat.com/errata/RHSA-2026:36207 REF https://access.redhat.com/errata/RHSA-2026:36319 REF https://access.redhat.com/errata/RHSA-2026:36625 REF https://access.redhat.com/errata/RHSA-2026:36648 REF https://access.redhat.com/errata/RHSA-2026:36651 REF https://access.redhat.com/errata/RHSA-2026:36796 REF https://access.redhat.com/errata/RHSA-2026:36797 REF https://access.redhat.com/errata/RHSA-2026:36808 REF https://access.redhat.com/errata/RHSA-2026:37268 REF https://access.redhat.com/errata/RHSA-2026:37271 REF https://access.redhat.com/errata/RHSA-2026:37272 REF https://access.redhat.com/errata/RHSA-2026:37278 REF https://access.redhat.com/errata/RHSA-2026:37286 REF https://access.redhat.com/errata/RHSA-2026:37296 REF https://access.redhat.com/errata/RHSA-2026:37387 REF https://access.redhat.com/errata/RHSA-2026:40118 REF https://access.redhat.com/errata/RHSA-2026:40119 REF https://access.redhat.com/errata/RHSA-2026:40262 REF https://access.redhat.com/errata/RHSA-2026:40945 REF https://access.redhat.com/errata/RHSA-2026:40969 REF https://access.redhat.com/errata/RHSA-2026:40972 REF https://access.redhat.com/errata/RHSA-2026:40974 REF https://access.redhat.com/errata/RHSA-2026:41019 REF https://access.redhat.com/errata/RHSA-2026:41031 REF https://access.redhat.com/errata/RHSA-2026:41036 REF https://access.redhat.com/errata/RHSA-2026:41055 REF https://access.redhat.com/errata/RHSA-2026:41066 REF https://access.redhat.com/errata/RHSA-2026:42146 REF https://access.redhat.com/errata/RHSA-2026:42796 REF https://access.redhat.com/errata/RHSA-2026:43052 REF https://access.redhat.com/errata/RHSA-2026:43692 REF https://access.redhat.com/errata/RHSA-2026:46885 REF https://access.redhat.com/errata/RHSA-2026:46903 REF https://access.redhat.com/errata/RHSA-2026:47735 REF https://access.redhat.com/errata/RHSA-2026:48151 REF https://access.redhat.com/errata/RHSA-2026:51033 REF https://access.redhat.com/errata/RHSA-2026:51038 REF https://access.redhat.com/errata/RHSA-2026:52857 REF https://access.redhat.com/errata/RHSA-2026:52910 REF https://access.redhat.com/errata/RHSA-2026:54531 REF https://access.redhat.com/errata/RHSA-2026:57191 REF https://access.redhat.com/errata/RHSA-2026:57194 REF https://access.redhat.com/errata/RHSA-2026:59467 REF https://access.redhat.com/errata/RHSA-2026:60520 REF https://access.redhat.com/errata/RHSA-2026:66022 REF https://access.redhat.com/errata/RHSA-2026:66521 REF https://access.redhat.com/security/cve/CVE-2026-39828 REF https://bugzilla.redhat.com/show_bug.cgi?id=2480687 REF https://go.dev/cl/781621 REF https://go.dev/issue/79562 REF https://groups.google.com/g/golang-announce/c/a082jnz-LvI REF https://pkg.go.dev/vuln/GO-2026-5014 REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39828.json

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy