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·22 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

•2 days 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
14 views•5 min read
•2 days 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
12 views•5 min read
•2 days 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
11 views•7 min read
•2 days 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
13 views•6 min read
•2 days 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
13 views•6 min read
•2 days 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
8 views•6 min read