CyberSecBulletin
CVE-2026-42508NVD status: Modified

golang.org/x/crypto/ssh/knownhosts: Improper Certificate Validation

CVE-2026-42508 is a high-severity improper certificate validation vulnerability in golang.org/x/crypto/ssh/knownhosts from Golang.org/x/crypto, with a CVSS 3.1 base score of 7.4 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 0.52.0 as the first without the flaw, so updating golang.org/x/crypto/ssh/knownhosts to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 6.91% chance of exploitation within 30 days, which is in the top 5.81% of all scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update golang.org/x/crypto/ssh/knownhosts to 0.52.0 or a later version.
  2. Update Crypto to 0.52.0 or a later version.
  3. Read the advisory on pkg.go.dev for workarounds and exact fixed builds.
  4. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Golang.org/x/cryptogolang.org/x/crypto/ssh/knownhostsbefore 0.52.00.52.0
Red HatRed Hat Enterprise Linux 10Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-OnNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.8 Telecommunications Update ServiceNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.8 Update Services for SAP SolutionsNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 9Not specified in the recordNot stated
Red HatRHEM 1.0 for RHEL 9Not specified in the recordNot stated
Red HatRHEM 1.1 for RHEL 10Not specified in the recordNot stated
Red HatRHEM 1.1 for RHEL 9Not specified in the recordNot stated
Red HatCluster Observability Operator 1.5.0Not specified in the recordNot stated
Red HatDevWorkspace Operator 0.42Not specified in the recordNot stated
Red HatLogging Subsystem for Red Hat OpenShift 6.6Not specified in the recordNot stated
Red Hatmulticluster engine for Kubernetes 2.1Not specified in the recordNot stated
Red Hatmulticluster engine for Kubernetes 2.11Not specified in the recordNot stated
Red Hatmulticluster engine for Kubernetes 2.8Not specified in the recordNot stated
Red HatOpenShift API for Data Protection 1.3Not specified in the recordNot stated
Red HatOpenShift API for Data Protection 1.4Not specified in the recordNot stated
Red HatOpenShift API for Data Protection 1.5Not specified in the recordNot stated
Red HatOpenShift API for Data Protection 1.6Not specified in the recordNot stated
Red HatRed Hat Advanced Cluster Management for Kubernetes 2.11Not specified in the recordNot stated
Red HatRed Hat Advanced Cluster Management for Kubernetes 2.13Not specified in the recordNot stated
Red HatRed Hat Advanced Cluster Management for Kubernetes 2.16Not specified in the recordNot stated
Red HatRed Hat Advanced Cluster Security 4.9Not specified in the recordNot stated

Version data comes from the organisation that assigned the CVE; 31 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
HighSuccess depends on conditions outside the attacker's control.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N. Scored by CNA.

Scoring systemScoreSeverityScored by
CVSS 3.19.1CriticalCISA (ADP)
CVSS 3.17.4HighCNA

Official description

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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Improper Certificate Validation

The product does not validate, or incorrectly validates, a certificate.

How developers prevent this class of flaw

  • Certificates should be carefully managed and checked to assure that data are encrypted with the intended owner's public key.
  • If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.

More Improper Certificate Validation vulnerabilities (CWE-295)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Improper Certificate Validation vulnerabilities

Spotted an error? Tell us.