CVE-2026-3497 Overview
CVE-2026-3497 affects the GSSAPI patches that several Linux distributions apply to OpenSSH. The upstream OpenSSH project is not affected. The flaw stems from improper error handling during GSSAPI key exchange, where sshpkt_disconnect() is called instead of ssh_packet_disconnect(). The first variant does not terminate the process, allowing execution to continue without initializing connection variables. Subsequent code then accesses uninitialized memory, producing undefined behavior [CWE-908]. A remote attacker can trigger the condition by sending an unexpected GSSAPI message type during key exchange.
Critical Impact
A network-based, unauthenticated attacker can induce undefined behavior in the SSH server process by triggering use of uninitialized memory during GSSAPI key exchange. Real-world impact depends on compiler hardening flags applied by the distribution.
Affected Products
- OpenSSH GSSAPI delta patches shipped by Linux distributions (upstream OpenSSH is not affected)
- Ubuntu (see Ubuntu Security Advisory for affected releases)
- Debian LTS (see Debian LTS announcement for affected releases)
Discovery Timeline
- 2026-03-12 - Vulnerability publicly discussed on the Openwall oss-security mailing list
- 2026-03-12 - CVE-2026-3497 published to NVD
- 2026-04-16 - Last updated in NVD database
Technical Details for CVE-2026-3497
Vulnerability Analysis
The vulnerability resides in the GSSAPI key exchange code path added by distribution-specific patches on top of upstream OpenSSH. During GSSAPI key exchange, the server expects a defined sequence of message types. When an unexpected message type arrives, the patched code calls sshpkt_disconnect() to signal the error condition. Unlike ssh_packet_disconnect(), this function returns control to the caller rather than terminating the process.
Because the error path does not abort execution, downstream logic continues to run as if the GSSAPI exchange succeeded. Connection-related variables that should have been populated during a valid exchange are never initialized. The variables are not pre-set to NULL, so they retain whatever stack or heap residue exists at the time. Later code reads these variables as if they held valid pointers or structures.
Root Cause
The root cause is the use of uninitialized variables [CWE-908] following a non-terminating error handler. Two compounding issues contribute: the wrong disconnect helper is invoked on the error branch, and the affected variables are not explicitly initialized to NULL at declaration. Either fix in isolation would have prevented the unsafe read.
Attack Vector
Exploitation requires network access to an SSH server that ships the affected GSSAPI delta and has GSSAPI key exchange enabled. The attacker sends a malformed or unexpected GSSAPI message type during the initial key exchange. No authentication or user interaction is required. The resulting behavior is non-deterministic and depends on memory layout, compiler optimizations, and hardening flags such as stack protection, position-independent executables, and uninitialized variable zeroing.
No verified proof-of-concept code is available. See the Openwall oss-security thread and the Ubuntu Security Advisory for technical details.
Detection Methods for CVE-2026-3497
Indicators of Compromise
- Unexpected sshd process crashes or segmentation faults correlated with inbound SSH connection attempts
- Connection attempts that include GSSAPI key exchange messages from sources outside expected Kerberos realms
- Aborted or malformed SSH key exchange transcripts visible in sshd debug logs
Detection Strategies
- Audit installed openssh-server packages on Linux hosts to identify versions carrying the vulnerable GSSAPI delta patch
- Monitor sshd for abnormal termination signals and core dumps following remote connection attempts
- Inspect authentication logs for repeated GSSAPI key exchange failures from a single source IP
Monitoring Recommendations
- Forward sshd logs and process crash events to a centralized logging or SIEM platform for correlation
- Alert on GSSAPI key exchange attempts to hosts where Kerberos authentication is not in use
- Track package versions across the fleet to confirm patched builds are deployed after vendor updates
How to Mitigate CVE-2026-3497
Immediate Actions Required
- Apply distribution security updates from Ubuntu, Debian LTS, and other affected vendors as they become available
- Disable GSSAPI key exchange on SSH servers that do not require Kerberos by setting GSSAPIKeyExchange no and GSSAPIAuthentication no in sshd_config
- Restrict inbound SSH access to trusted networks using firewall rules or bastion hosts
Patch Information
Distribution maintainers are issuing patches that replace sshpkt_disconnect() with ssh_packet_disconnect() on the affected error path, ensuring the process terminates instead of continuing with uninitialized state. Refer to the Ubuntu Security Advisory and the Debian LTS Announcement for package versions and update instructions.
Workarounds
- Disable GSSAPI features in sshd_config until patched packages are installed
- Compile or rebuild OpenSSH with hardening flags that zero-initialize stack variables to reduce the impact of the uninitialized read
- Limit SSH exposure to the public internet and require VPN or jump host access for administrative sessions
# Configuration example - disable GSSAPI in /etc/ssh/sshd_config
GSSAPIAuthentication no
GSSAPIKeyExchange no
GSSAPICleanupCredentials yes
# Reload sshd to apply changes
sudo systemctl reload sshd
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

