CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-42508

CVE-2026-42508: Bypass of SSH Certificate Authority Revocation in golang.org/x/crypto/ssh/knownhosts

Alon Barad
Alon Barad
Software Engineer

Jun 26, 2026·5 min read·13 visits

Executive Summary (TL;DR)

Go's SSH client/server knownhosts verification bypassed revocation checks for Certificate Authorities, trusting certificates signed by explicitly revoked CA keys.

An issue was discovered in Go's `golang.org/x/crypto/ssh/knownhosts` package where a revoked Certification Authority (CA) public key was not correctly checked for revocation during SSH host certificate validation. This allowed clients or servers utilizing the library to validate and trust host certificates issued by explicitly revoked CAs.

Vulnerability Overview

The golang.org/x/crypto/ssh/knownhosts package parses OpenSSH known_hosts files and provides callbacks to verify host key configurations. It is designed to evaluate standard host keys, trust-delegated Certificate Authorities, and explicitly revoked keys. When configured, it registers a key database capable of parsing the @revoked marker to terminate trust for compromised credentials.

In standard SSH certificate-based authentication architectures, a Certificate Authority is established to sign individual host certificates. If a CA is decommissioned or its private key is compromised, administrators mark the CA public key as @revoked in the client configuration to invalidate all downstream certificates. The vulnerability allows certificates signed by such revoked authorities to continue to pass validation successfully.

This behavior bypasses the designed revocation controls. An attacker in possession of a compromised CA private key can exploit this to generate valid certificates for arbitrary servers, undermining client-to-server trust. The issue represents a critical flaw categorized under CWE-295 (Improper Certificate Validation).

Root Cause Analysis

The vulnerability stems from an incorrect lookup key extraction inside the hostKeyDB.IsRevoked unexported method. The ssh.CertChecker engine relies on an IsRevoked callback of type func(cert *ssh.Certificate) bool during verification to verify whether presented credentials are listed in the key revocation list.

When parsing a known_hosts file, any entry marked with @revoked is parsed and stored inside the db.revoked map. The key for this map is the string representation of the marshaled public key of the revoked entity. The original logic in IsRevoked was implemented as follows:

func (db *hostKeyDB) IsRevoked(key *ssh.Certificate) bool {
	_, ok := db.revoked[string(key.Marshal())]
	return ok
}

When a client connects to a server, the server presents a host certificate (*ssh.Certificate). The client passes this certificate directly to IsRevoked. The original code marshaled this individual certificate and checked the resulting string against the revocation map.

However, if the administrator revoked the Certificate Authority itself, the map contained the marshaled public key of the CA, not the host certificate. The host certificate's outer signature structure does not match the raw CA public key structure. Because the callback failed to extract and inspect the signing authority's public key (key.SignatureKey), the verification function consistently returned false for any leaf certificate issued by the revoked authority.

Code Analysis

The vulnerability is remediated by checking both the presented leaf certificate and its signing authority against the revocation list. The patch updates the validation callback to safely extract the signing key.

Here is the vulnerable implementation:

// Vulnerable Code
func (db *hostKeyDB) IsRevoked(key *ssh.Certificate) bool {
	_, ok := db.revoked[string(key.Marshal())]
	return ok
}

Here is the corrected implementation introduced in the patch:

// Patched Code
func (db *hostKeyDB) IsRevoked(key *ssh.Certificate) bool {
	if _, ok := db.revoked[string(key.Marshal())]; ok {
		return true
	}
	if _, ok := db.revoked[string(key.SignatureKey.Marshal())]; ok {
		return true
	}
	return false
}

By executing key.SignatureKey.Marshal(), the validation engine correctly extracts the public key of the signing CA. It then performs a lookup in the db.revoked map. If either the specific host certificate or the parent Certificate Authority is marked as revoked, the method returns true, triggering an immediate authentication failure.

This fix is robust and complete. It addresses the architectural oversight directly without introducing alternative bypasses, ensuring that revocation inherits down to leaf certificates as expected in hierarchical PKI systems.

Exploitation Methodology

To exploit this vulnerability, an attacker must have acquired the private key of a Certificate Authority that was previously trusted but has since been marked as @revoked in the target's known_hosts database. The attack does not require any specialized user interaction.

The exploitation flow operates as follows. First, the attacker establishes a rogue SSH server at an IP address or hostname the client attempts to reach. Second, the attacker generates an SSH host certificate for the target hostname, signing it with the revoked CA private key. When the vulnerable client initiates a connection, the rogue server presents this certificate.

The vulnerable validation engine evaluates the certificate. Because the host certificate itself is not explicitly listed in the revocation database, the callback reports that the certificate is valid, completely ignoring the revoked status of the CA that signed it. The connection proceeds, allowing the attacker to conduct an Adversary-in-the-Middle attack, potentially capturing authentication tokens, session data, or cleartext credentials.

Impact Assessment

This vulnerability carries a CVSS score of 9.1 (Critical). Successful exploitation results in a complete loss of connection confidentiality and integrity, as clients are misled into establishing secure tunnels to untrusted and potentially malicious destinations.

While the vulnerability requires the attacker to possess a compromised CA key, the consequences of such compromises are severe in automated environments. Automated backup routines, configuration management workflows, and container deployment orchestrators frequently use SSH to run administrative actions. If these clients are redirected to a rogue host, the impact propagates quickly through the network.

Because the vulnerability exists at the protocol validation layer, detection cannot easily rely on network-level signatures without decrypting the SSH handshake. Mitigating the vulnerability at the dependency level remains the only reliable safeguard to protect automated systems from trust-validation failures.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS Probability
0.37%
Top 71% most exploited

Affected Systems

Systems running applications compiled with Go's golang.org/x/crypto/ssh/knownhosts package prior to version 0.52.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
golang.org/x/crypto
Go
< v0.52.0v0.52.0
AttributeDetail
CWE IDCWE-295
Attack VectorNetwork (AV:N)
CVSS Score9.1
EPSS Score0.00368
Exploit StatusProof-of-Concept
KEV StatusNot in CISA KEV

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Defense Evasion
T1557Adversary-in-the-Middle
Credential Access
CWE-295
Improper Certificate Validation

The application does not validate or incorrectly validates a certificate, which can allow an attacker to spoof a trusted entity by presenting a malicious or revoked certificate.

Known Exploits & Detection

Go Vulnerability DatabaseUnit testing demonstrating the validation bypass using standard certificate generators and fake revoked CAs

Vulnerability Timeline

Patch developed and uploaded to Gerrit (Change ID: I20f33cba20756b048726ff3464b83871859d3b5c)
2026-05-21
Patch approved and merged into master branch of golang.org/x/crypto
2026-05-21
Public security advisory released under Go database entry GO-2026-5021
2026-05-22
Official publication of CVE-2026-42508 in the National Vulnerability Database (NVD)
2026-05-22

References & Sources

  • [1]Go Issue Tracker Ticket 79568
  • [2]Gerrit Change Review 781220
  • [3]Go Vulnerability Database Record GO-2026-5021
  • [4]NVD CVE-2026-42508 Detail

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 8 hours ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 8 hours ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
4 views•5 min read
•about 9 hours ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 9 hours ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 10 hours ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
6 views•6 min read
•about 10 hours ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
5 views•6 min read