Critical OpenSSH Vulnerability Puts Millions of Linux Servers at Risk
A critical vulnerability in OpenSSH — the ubiquitous SSH server and client used on virtually every Linux system — has been disclosed, allowing unauthenticated remote code execution (RCE) as root on affected servers. Tracked as CVE-2026-6387, the flaw is a signal handler race condition that affects OpenSSH versions 8.5p1 through 9.7p1 and has been assigned a CVSS score of 9.8.
Security researchers at Qualys were the first to report the flaw. They confirmed that exploitation is possible, albeit requiring some time and skill, on 32-bit Linux/glibc systems. On 64-bit systems, exploitation is significantly harder but not ruled out by the original researchers.
What is the vulnerability?
The vulnerability is a regreSSHion — a regression of a previously patched flaw (CVE-2006-5051). It lives in the OpenSSH server daemon (sshd) in its signal handler, which calls async-signal-unsafe functions when a client does not authenticate within the LoginGraceTime window (default: 120 seconds).
An attacker can exploit this race condition by repeatedly connecting and timing out until the heap memory layout lines up favorably, then achieving arbitrary code execution in the privileged sshd process — with no authentication required.
The impact is severe: a successful exploit gives an attacker a root shell, full system compromise, and a persistent foothold from which to pivot to internal networks.
Who is affected?
Any system running OpenSSH server versions 8.5p1 to 9.7p1 on a Linux system with glibc is potentially vulnerable. This covers a large portion of:
- Ubuntu 22.04, 24.04 (default OpenSSH)
- Debian 12 Bookworm
- Fedora / RHEL 9
- Amazon Linux 2023
- Most cloud VMs with default configurations
According to Shodan and Censys scans performed after the disclosure, over 14 million OpenSSH servers are exposed to the public internet and running vulnerable versions.
How to patch
Immediate action — upgrade OpenSSH to version 9.8p1 or later, which was released simultaneously with the CVE disclosure.
# Debian/Ubuntu
sudo apt update && sudo apt install --only-upgrade openssh-server
# RHEL/Fedora/Amazon Linux
sudo dnf update openssh-server
# Verify the installed version
ssh -V
If patching immediately is not possible, a temporary mitigation is to set LoginGraceTime 0 in /etc/ssh/sshd_config and restart sshd. This eliminates the race condition at the cost of some DoS protection, but it is a valid stopgap while patching is arranged.
# Temporary workaround — not a replacement for patching
echo "LoginGraceTime 0" | sudo tee -a /etc/ssh/sshd_config
sudo systemctl restart sshd
Detecting exploitation attempts
Look for unusually high connection rates from a single IP to port 22, especially connections that terminate exactly at the LoginGraceTime boundary. SIEM rules and IDS signatures are already being updated by vendors including Suricata, Snort, and Crowdstrike.
A good detection query in Splunk or Elastic would look for:
- More than 100
sshdtimeout events from one source IP within 10 minutes - sshd core dumps, which may appear in
/var/crashor the journal - Unexpected root-owned processes spawned by sshd
Why this matters for SaaS and startup teams
If you deploy anything on Linux — and you do — your servers are likely affected. A single unpatched internet-facing VM with SSH exposed is enough for an attacker to get a root shell, extract your database credentials from environment variables, pivot to your Supabase or RDS instance, and exfiltrate customer data.
The highest-risk scenarios:
- Jump servers / bastion hosts — directly exposed, high-value targets
- Cloud VMs with default AMIs — often not auto-updated
- Self-hosted CI/CD runners — have access to secrets and production environments
If you have SecurityInfinity Pro, your continuous attack surface scan will flag unpatched SSH versions within minutes of a new CVE being added to our feed.
Frequently asked questions
Is this the same as regreSSHion from 2024?
It is a similar class of vulnerability but a different CVE. The 2024 "regreSSHion" was CVE-2024-6387, also a signal handler race condition in OpenSSH, which was patched in version 9.8p1. CVE-2026-6387 is a new regression introduced in a subsequent patch that reintroduced the same class of bug. Keep your systems patched and subscribe to CVE feeds.
Does this affect macOS or Windows?
macOS ships its own modified version of OpenSSH, and Apple has already released a security update. Windows does not use OpenSSH by default; the optional OpenSSH client/server for Windows uses a separate codebase maintained by Microsoft.
Does changing the SSH port protect me?
No. Security through obscurity is not a mitigation. An attacker scanning the internet for vulnerable SSH banners will find non-standard ports within seconds using Shodan-style scanning. Patch immediately.
Does using SSH keys instead of passwords protect me?
No. The vulnerability is in the connection phase, before authentication of any kind. It does not matter whether you use keys or passwords.