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

CVE-2026-39827: Denial of Service via Unbounded Memory Growth in Go SSH (golang.org/x/crypto/ssh)

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 26, 2026·6 min read·137 visits

Executive Summary (TL;DR)

A memory leak in golang.org/x/crypto/ssh prior to version 0.52.0 allows authenticated clients to trigger a Denial of Service by repeatedly sending channel requests that the server rejects.

An unbounded memory leak vulnerability in the Go SSH package (golang.org/x/crypto/ssh) allows authenticated users to crash the server by repeatedly requesting connection channels that are rejected, leading to system resource exhaustion.

Vulnerability Overview

The vulnerability CVE-2026-39827 represents a critical memory leak flaw in the golang.org/x/crypto/ssh package, which is Go's official implementation of the SSH protocol.

This package is widely used to develop custom SSH daemons, remote administration agents, container orchestration handlers, and secure Git hosting applications. When a server exposes an SSH endpoint using this library, it establishes a multiplexed transport channel structure to manage multiple virtual channels over a single physical TCP connection.

The vulnerability is classified under CWE-401 (Missing Release of Memory after Effective Lifetime). It is triggered when an authenticated client requests a logical channel that the server application rejects, leading to an unbounded memory leak that eventually causes a Denial of Service due to system resource exhaustion.

Root Cause Analysis

To understand the root cause of CVE-2026-39827, it is necessary to examine how the Go SSH multiplexer manages connection states. Under normal operation, when a client sends an SSH_MSG_CHANNEL_OPEN packet, the server's multiplexer (mux) assigns a localId to trace the request and registers it in its internal map (mux.chanList). This list acts as a registry to route incoming traffic correctly.

Once registered, the multiplexer delivers a NewChannel object to the server's high-level application handler. The application determines whether to allow the channel based on authorization, resource usage, or requested services. If the application decides to deny the request, it invokes the Reject() function.

The flaw lies in the original implementation of the Reject() function in ssh/channel.go. While the method updated the channel's internal state machine and sent the appropriate rejection packet to the client, it completely omitted any code to clean up the registration record inside the connection's chanList map.

Because the multiplexer maintains a strong reference to the rejected channel throughout the lifetime of the underlying TCP session, the Go garbage collector is unable to reclaim any of the allocated memory. This includes the internal channel structures, input/output packet queues, and synchronization channels, resulting in a persistent memory leak.

Code-Level Patch Analysis

The following Mermaid diagram outlines the vulnerable channel setup state vs. the corrected cleanup flow.

In the vulnerable implementation, the Reject() function processed the rejection and returned immediately, leaving the channel registered. Let us analyze the difference introduced in the patch.

// Vulnerable Code Path
func (ch *channel) Reject(reason RejectionReason, message string) error {
	reject := chanOpenConfirmMsg{
		// ... fields mapped ...
	}
	ch.decided = true
	return ch.sendMessage(reject) // Exit without cleaning up chanList
}
// Patched Code Path (6c195c8a97ae3d91a366ebdd7787d5faa64bf42a)
func (ch *channel) Reject(reason RejectionReason, message string) error {
	reject := chanOpenConfirmMsg{
		// ... fields mapped ...
	}
	ch.decided = true
	err := ch.sendMessage(reject)
 
	// Remove the channel from the mux to prevent memory leaks.
	// Do not call ch.close() here: no goroutine holds a reference to a
	// rejected channel's internal channels (msg, incomingRequests), so
	// removing it from chanList is sufficient for GC. Calling close()
	// would race with the mux loop goroutine (handlePacket or dropAll),
	// causing a panic from closing an already-closed channel.
	ch.mux.chanList.remove(ch.localId)
 
	return err
}

As annotated in the fix, the developers deliberately avoided calling ch.close(). Doing so would trigger a severe race condition against the multiplexer's packet handling loops, which would crash the runtime with a panic. Simply deleting the reference from the map allows the garbage collector to safely sweep up the unused allocations.

Exploitation Methodology

An attacker must establish an authenticated SSH connection to exploit this vulnerability. No authorization privileges beyond standard authentication are required, meaning any standard user or automated service account with SSH access can perform the attack.

The attack begins when the client issues a loop of consecutive SSH_MSG_CHANNEL_OPEN requests. To trigger the memory leak, the client requests a channel type that the server is configured to reject. Common examples include requesting TCP port forwarding or custom subsystem channels when such features are disabled.

Every rejected attempt allocates a fresh channel context containing memory structures that remain resident in RAM. By scripting a rapid cycle of channel open requests over a single persistent connection, an attacker can leak megabytes of memory per minute. This process eventually causes memory pressure to escalate to the point where the operating system's Out-Of-Memory killer terminates the SSH server process, resulting in a complete Denial of Service.

Impact Assessment

The vulnerability carries a CVSS base score of 6.5, reflecting a medium-severity threat. The primary security impact is complete loss of Availability for the host application, while Confidentiality and Integrity remain uncompromised.

In real-world environments, this vulnerability is highly critical for multi-user systems. For instance, code hosting platforms like Gitea or enterprise Git-over-SSH servers are exposed to authenticated Denial of Service attacks. A single malicious user account can crash the container or the entire infrastructure hosting the service.

Furthermore, because many container environments use static binaries compiled with Go, updating the system library requires compiling the parent projects from scratch. This introduces significant lag in patching deployment pipelines.

Detection and Remediation

The definitive remediation for CVE-2026-39827 is updating the Go crypto dependency to version 0.52.0 or higher. Developers can upgrade the package by executing the command go get golang.org/x/crypto@v0.52.0 and rebuilding all dependent applications.

For environments where immediate rebuilding is not feasible, security administrators can monitor for signs of active exploitation. Intrusion detection systems should check for an abnormal frequency of SSH_MSG_CHANNEL_OPEN_FAILURE (type 92) messages originating from a single session.

Additionally, host-level metrics should monitor SSH daemon process memory. A linear, continuous rise in RSS memory without a corresponding drop indicates an active leak scenario and should trigger automated session termination or rate limiting.

Official Patches

GoGerrit Commit Details
GoGerrit Change List CL 781320

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Go application servers using golang.org/x/crypto/ssh to run SSH server-side servicesGitea SSH serversDocker/Podman daemon SSH componentsHashiCorp Vault SSH secrets engine

Affected Versions Detail

Product
Affected Versions
Fixed Version
golang.org/x/crypto/ssh
Go
< 0.52.00.52.0
AttributeDetail
CWE IDCWE-401
Attack VectorNetwork (AV:N)
CVSS Score6.5 (Medium)
EPSS Score0.00196
ImpactDenial of Service (DoS) / Memory Exhaustion
Exploit StatusNone (No public exploits)
KEV StatusNot listed

MITRE ATT&CK Mapping

T1499.003Endpoint Denial of Service: System Resource Overload
Impact
T1499.004Endpoint Denial of Service: Application Exhaustion Flood
Impact
CWE-401
Missing Release of Memory after Effective Lifetime

The system does not release memory after its effective lifetime has ended, which can lead to resource exhaustion.

Vulnerability Timeline

Go Issue #35127 is opened identifying channel leak after Reject()
2019-10-24
Developer Nicola Murino creates the patch
2026-03-01
Gerrit CL 781320 is reviewed, tested via LUCI TryBots, and merged
2026-05-21
CVE-2026-39827 is published in NVD and CVE databases
2026-05-22
CVE metadata updated with further details
2026-06-17

References & Sources

  • [1]Gerrit Change List 781320
  • [2]Go Review Source Code
  • [3]Go GitHub Issue #35127
  • [4]Go Vulnerability Database Advisory
  • [5]CVE-2026-39827 Record

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 6 hours ago•CVE-2026-57576
6.5

CVE-2026-57576: Application-Level Denial of Service via Uncontrolled Resource Consumption in Plone

CVE-2026-57576 is an application-level Denial of Service (DoS) vulnerability in Plone. It resides in the `plone.app.dexterity` and `plone.app.contenttypes` packages, allowing authenticated users with content creation permissions to submit excessively long metadata attributes. Because these fields are stored without length limits and subsequently processed by indexing and rendering engines, they trigger complete server resource exhaustion and thread starvation.

Alon Barad
Alon Barad
6 views•9 min read
•about 7 hours ago•GHSA-8PCW-H6W9-H46G
6.5

GHSA-8PCW-H6W9-H46G: Denial of Service via Uncontrolled Resource Consumption in plone.app.contenttypes

An uncontrolled resource consumption vulnerability in plone.app.contenttypes allows authenticated users to trigger application-level denial of service via oversized filename metadata in file uploads.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 8 hours ago•CVE-2026-61685
7.5

CVE-2026-61685: SQL Injection via Dynamic Query Parameters in ReactPress

An unauthenticated remote SQL injection vulnerability exists in multiple API list endpoints of ReactPress prior to version 3.7.0. The vulnerability stems from unsafe construction of TypeORM QueryBuilder conditions, where untrusted HTTP query parameter keys are interpolated directly into SQL statements as identifiers without sanitization or validation.

Alon Barad
Alon Barad
7 views•9 min read
•about 9 hours ago•CVE-2026-56669
7.5

CVE-2026-56669: Remote Denial of Service via Algorithmic Complexity and Interpretation Conflict in Elysia

CVE-2026-56669 is a high-severity vulnerability in the Elysia web framework (ElysiaJS) that combines Inefficient Algorithmic Complexity (CWE-407) and an Interpretation Conflict (CWE-436). It allows remote, unauthenticated attackers to cause a complete Denial of Service (DoS) via CPU resource exhaustion using specially crafted multipart or urlencoded payloads.

Amit Schendel
Amit Schendel
8 views•6 min read
•about 10 hours ago•CVE-2026-86065
7.5

CVE-2026-86065: Denial of Service via Resource Exhaustion in klever-go WebSocket Subscription Endpoint

Prior to version 1.7.20, the default-open WebSocket `/subscribe` endpoint in klever-go was vulnerable to remote resource exhaustion. Unauthenticated, remote attackers could crash validator and node processes by exploiting unbounded frame reads, uncapped concurrent connections, unrestricted memory allocation for subscription address keys, and a permanent memory leak in subscription map tracking on client disconnects.

Alon Barad
Alon Barad
7 views•7 min read
•about 11 hours ago•CVE-2026-82405
8.7

CVE-2026-82405: Incorrect Authorization leading to Account Takeover in klever-go

A critical incorrect authorization vulnerability (CWE-863) exists in the Go implementation of the Klever blockchain protocol (klever-go) prior to version 1.7.20. The vulnerability allows an attacker to completely replace a target account's permission set by manipulating the RecipientAddr parameter in a VM built-in function, leading to total account takeover.

Amit Schendel
Amit Schendel
8 views•5 min read