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-39829

CVE-2026-39829: Denial of Service in Go SSH Parser

Alon Barad
Alon Barad
Software Engineer

Jun 26, 2026·5 min read·4 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can exhaust SSH server CPU resources by sending public keys with oversized parameters during the authentication handshake.

A high-severity Denial of Service (DoS) vulnerability exists in the golang.org/x/crypto/ssh package prior to version 0.52.0. The vulnerability is caused by a lack of size and range validation on incoming RSA and DSA public key parameters during SSH authentication. An unauthenticated attacker can submit a crafted public key with pathologically large parameters, triggering intensive CPU computation during signature verification and leading to a complete Denial of Service.

Vulnerability Overview

The Go SSH implementation inside the golang.org/x/crypto/ssh package prior to version 0.52.0 is vulnerable to an unauthenticated remote Denial of Service (DoS) vulnerability. During the public key authentication phase of an SSH handshake, a client can send public keys with pathologically large parameters. The library attempts to parse these keys and perform expensive mathematical computations before validating the key parameters.\n\nAn attacker does not need to possess valid credentials to trigger this vulnerability. The parsing and subsequent validation attempt occurs during the initial authentication phase (SSH_MSG_USERAUTH_REQUEST), which is accessible to any network-connected client. This flaw exposes any server utilizing the Go SSH library, such as container runtimes, Kubernetes components, and custom SSH bastions.

Root Cause Analysis

The root cause of this vulnerability lies in the missing range and size verification of incoming cryptographic parameters within the RSA and DSA public key parsers in ssh/keys.go. When an SSH client requests public key authentication, it transmits key parameters as raw byte arrays, which the server parses into Go's arbitrary-precision big.Int structures.\n\nIn the case of RSA, the parser extracted the modulus $N$ and public exponent $E$ using Unmarshal, but did not check the bit length of the modulus $N$. In the case of DSA, the parser failed to verify the sub-prime $Q$, the generator $G$, and the public value $Y$ against standard boundaries.\n\nBecause signature verification involves modular exponentiation (such as $g^{u_1} \cdot y^{u_2} \pmod p$), processing pathologically large values of $N$, $Q$, or $Y$ causes the underlying arbitrary-precision arithmetic operations to consume massive CPU resources. The execution time of these operations scales quadratically or cubically with the bit length, allowing an attacker to exhaust the host's CPU cycles with a single crafted key.

Code-Level Vulnerability & Patch Analysis

The vulnerability was mitigated in golang.org/x/crypto version 0.52.0 by enforcing strict constraints on parameter sizes during deserialization.\n\nIn the RSA parser (parseRSA in ssh/keys.go), a boundary check was introduced to reject keys with a modulus exceeding 8192 bits. This limit aligns with the threshold enforced by the Go standard library's crypto/tls package.\n\ngo\n// ssh/keys.go\nif w.N.BitLen() > 8192 {\n\treturn nil, nil, errors.New(\"ssh: rsa modulus too large\")\n}\n\n\nFor DSA public keys, the patch introduced validations in both checkDSAParams and parseDSA. It restricts the subprime $Q$ to exactly 160 bits (in accordance with FIPS 186-2) and validates that the generator $G$ and public value $Y$ reside within the finite group boundaries ($0 < G < P$, $0 < Y < P$).\n\ngo\n// ssh/keys.go\nif l := param.Q.BitLen(); l != 160 {\n\treturn fmt.Errorf(\"ssh: unsupported DSA sub-prime size %d\", l)\n}\nif param.G.Cmp(param.P) >= 0 {\n\treturn errors.New(\"ssh: DSA generator larger than modulus\")\n}\nif param.G.Sign() <= 0 {\n\treturn errors.New(\"ssh: DSA generator must be positive\")\n}\nif w.Y.Sign() <= 0 || w.Y.Cmp(w.P) >= 0 {\n\treturn nil, nil, errors.New(\"ssh: DSA public value Y out of range\")\n}\n\n\nThese checks ensure that the mathematical operations performed during signature verification are bounded by safe complexity limits.

Attack Methodology & Complexity

An attacker can exploit this vulnerability by initiating an SSH handshake and sending a crafted public key. During the SSH_MSG_USERAUTH_REQUEST phase, the attacker submits an RSA public key containing a modulus $N$ with a length of several hundred thousand bits, or a DSA public key containing an oversized sub-prime $Q$ or public value $Y$.\n\nThe SSH server reads the packet and unmarshals the parameters into memory as big.Int structures. When the server attempts to verify the signature associated with the public key, the cryptographic package executes modular exponentiations using these arbitrary-precision integers.\n\nBecause the CPU overhead of multi-precision division and multiplication scales exponentially with the input size, a single authentication attempt can lock a CPU core for several minutes. A threat actor can send multiple parallel authentication requests, quickly exhausting all available CPU cores on the host and resulting in a complete Denial of Service for legitimate connections.

Impact & Downstream Exposure

This vulnerability has a high CVSS v3.1 base score of 7.5. The impact is categorized as a high availability loss because successful exploitation halts the target service. The vulnerability can be exploited remotely, does not require authentication, and does not require user interaction.\n\nDue to Go's dominance in cloud-native infrastructure, the downstream impact is extensive. Vulnerable versions of the SSH library are embedded within critical technologies, including Docker, containerd, Kubernetes-related components, HashiCorp Vault, and various Linux distribution utilities.\n\nIf these management agents or container daemons expose SSH endpoints or parse untrusted keys, they can be targeted to disrupt host operations and infrastructure orchestration. High-priority deployments must immediately scan their binaries to detect compiled dependencies on older versions of golang.org/x/crypto.

Detection & Remediation

The primary remediation strategy is upgrading the golang.org/x/crypto dependency to version 0.52.0 or higher and recompiling all dependent Go applications.\n\nTo identify vulnerable binaries, security teams should use static analysis utilities such as govulncheck. This tool parses the embedded build metadata of Go binaries to verify import versions:\n\nbash\ngovulncheck ./...\n\n\nTo update the dependency within a Go module, run the following commands:\n\nbash\ngo get golang.org/x/crypto@v0.52.0\ngo mod tidy\n\n\nIn environments where immediate updating is not possible, access to SSH interfaces should be restricted to trusted networks using firewall rules and network access control lists (ACLs).

Official Patches

Go ProjectRSA modular limit patch
Go ProjectDSA parameters boundary validation patch

Fix Analysis (2)

Technical Appendix

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

Affected Systems

DockercontainerdHashiCorp VaultKubernetes ComponentsGiteaCloudflared

Affected Versions Detail

Product
Affected Versions
Fixed Version
golang.org/x/crypto/ssh
Go Project
< v0.52.0v0.52.0
AttributeDetail
CWE IDCWE-1176
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score7.5
EPSS Score0.00304
Exploit StatusProof-of-Concept
Affected Modulegolang.org/x/crypto/ssh
Fixed Versionv0.52.0

MITRE ATT&CK Mapping

T1499.003Endpoint Denial of Service: Application Complexity Exploitation
Impact
T1499.004Endpoint Denial of Service: Application Exhaustion
Impact
CWE-1176
Inefficient CPU Computation

The product performs computational operations on arbitrary-precision parameters without restricting input boundaries, resulting in excessive resource consumption.

Vulnerability Timeline

DSA fix drafted in CL 781661
2026-01-25
RSA fix drafted in CL 781641
2026-02-01
Go private tracking issue #79565 created
2026-05-21
Coordinated public disclosure and golang.org/x/crypto v0.52.0 released
2026-05-22

References & Sources

  • [1]Go Issue #79565
  • [2]Golang Announce Security Advisory
  • [3]Go Vulnerability Database Entry
  • [4]NVD CVE-2026-39829 Record
  • [5]Wiz CVE-2026-39829 Analysis

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

•19 minutes ago•CVE-2026-39830
9.1

CVE-2026-39830: Unsolicited Response Channel Deadlock and Resource Leak in golang.org/x/crypto/ssh

A denial-of-service (DoS) and resource leak vulnerability in the Go SSH package (golang.org/x/crypto/ssh) allows a malicious peer to permanently deadlock connection processing loops and leak memory. This issue stems from improper handling of unsolicited responses at the global and channel layers, which saturate internal bounded channel buffers and block the main multiplexer loop. The vulnerability is fully resolved in version 0.52.0.

Alon Barad
Alon Barad
1 views•7 min read
•about 5 hours ago•CVE-2026-39831
9.1

CVE-2026-39831: Authentication Bypass in golang.org/x/crypto/ssh via FIDO/U2F User Presence Bypass

An authentication bypass vulnerability was identified in the golang.org/x/crypto/ssh package. The library's verification logic for FIDO/U2F security keys failed to check the User Presence (UP) flag. This omission allows an attacker with access to a hardware token interface or an agent-forwarding socket to authenticate without physical user interaction.

Alon Barad
Alon Barad
5 views•5 min read
•about 5 hours ago•CVE-2026-39834
9.1

CVE-2026-39834: Infinite Loop and CPU Exhaustion via Integer Truncation in Go SSH Channel Write

A critical vulnerability exists in the Go SSH sub-repository (golang.org/x/crypto/ssh) before version 0.52.0. When an application writes payloads of 4GB or larger in a single write operation, integer truncation in the remote window calculation causes an infinite loop. This results in complete CPU core exhaustion and a denial-of-service condition.

Amit Schendel
Amit Schendel
6 views•7 min read
•about 7 hours ago•CVE-2026-42508
9.1

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

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.

Alon Barad
Alon Barad
9 views•5 min read
•about 8 hours ago•CVE-2026-46595
10.0

CVE-2026-46595: Critical Authorization Bypass via source-address Validation Failure in golang.org/x/crypto/ssh

An authorization bypass vulnerability exists in the golang.org/x/crypto/ssh package prior to version 0.52.0. When an SSH server is configured with a custom VerifiedPublicKeyCallback that returns a Permissions object containing a source-address critical option, the server fails to validate and enforce the restriction. This allows remote clients with valid public keys to bypass IP-based access restrictions and authenticate from unauthorized network locations.

Alon Barad
Alon Barad
6 views•7 min read
•about 10 hours ago•CVE-2026-48517
7.5

CVE-2026-48517: Remote Code Execution via Typeless Deserialization Blocklist Bypass in MessagePack-CSharp

A critical vulnerability exists in MessagePack-CSharp's typeless deserialization mechanism where configured blocklists fail to recursively inspect nested types. An attacker can bypass security restrictions by wrapping unauthorized types in arrays or generic collections, allowing insecure deserialization and remote code execution.

Alon Barad
Alon Barad
6 views•7 min read