Skip to main content

golang.org/x/crypto CVE-2026-42508

| EUVDEUVD-2026-31399 CRITICAL
Improper Certificate Validation (CWE-295)
2026-05-22 Go GHSA-5cgq-3rg8-m6cv
9.1
CVSS 3.1 · Vendor: Go
Share

Severity by source

Vendor (Go) PRIMARY
9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
SUSE
CRITICAL
qualitative
Red Hat
7.4 HIGH
qualitative

Primary rating from Vendor (Go).

CVSS VectorVendor: Go

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

4
Analysis Generated
May 28, 2026 - 15:08 vuln.today
CVSS changed
May 28, 2026 - 15:07 NVD
9.1 (None) 9.1 (CRITICAL)
Patch available
May 22, 2026 - 04:31 EUVD
CVE Published
May 22, 2026 - 02:31 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

Previously, a revoked 'SignatureKey' belonging to a CA was not correctly checked for revocation. Now, both the 'key' and 'key.SignatureKey' are checked for @revoked.

AnalysisAI

Improper certificate revocation validation in the golang.org/x/crypto/ssh/knownhosts package allows SSH connections to succeed against hosts whose CA SignatureKey has been revoked. Versions prior to 0.52.0 only validated the leaf 'key' against revocation entries while ignoring 'key.SignatureKey', enabling attackers holding a revoked CA-signed host key to impersonate trusted servers. No public exploit identified at time of analysis, and EPSS exploitation probability is very low at 0.02%.

Technical ContextAI

The flaw resides in golang.org/x/crypto/ssh/knownhosts, the Go standard ecosystem library used by SSH clients (including those built on golang.org/x/crypto/ssh) to validate remote host keys against a known_hosts file. The library supports @cert-authority entries that delegate trust to a CA which signs host certificates; revocation is expressed via @revoked entries. CWE-295 (Improper Certificate Validation) applies because the revocation check examined only the presented host key without recursively checking the embedded SignatureKey identifying the signing CA, so a revoked CA could still produce host certificates accepted as valid by client applications.

RemediationAI

Vendor-released patch: golang.org/x/crypto v0.52.0. Update the module in go.mod with 'go get golang.org/x/crypto@v0.52.0' and rebuild and redeploy any binaries that consume ssh/knownhosts, since the fix ships compiled into the application rather than as a runtime library. Confirm the upgrade via the Go announcement at https://groups.google.com/g/golang-announce/c/a082jnz-LvI and the advisory at https://pkg.go.dev/vuln/GO-2026-5021. If patching cannot occur immediately, compensating controls include removing @cert-authority entries from known_hosts files and pinning specific host keys directly (trade-off: loses CA-based scalability and requires manual key rotation), or rotating the trusted CA so the previously-revoked key is no longer in the trust chain (trade-off: requires re-signing all host certificates). 'govulncheck' should be run across the codebase to confirm no residual import paths remain on vulnerable versions.

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SLES15-SP6-CHOST-BYOS-GCE Fixed
SLES15-SP7-CHOST-BYOS-GCE Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed

Share

CVE-2026-42508 vulnerability details – vuln.today

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