Skip to main content

Wolfcore Cyber Security

regreSSHion (CVE-2024-6387): OpenSSH Flaw and How to Fix

Written by Ruben Selby, founder and penetration tester at Wolfcore. Last reviewed 23 November 2026.

Part of the Vulnerabilities and exploitation section of the Wolfcore Resources library.

In one sentence: regreSSHion is a flaw in the server part of OpenSSH, the tool most Linux servers use for remote login, that could let an attacker take over the server as its most powerful user without a password.

What it is

OpenSSH is the standard remote-login software on Linux and similar systems. Its server program is called sshd. In July 2024 the Qualys Threat Research Unit disclosed CVE-2024-6387. Qualys describes it as a signal handler race condition in sshd that allows unauthenticated remote code execution as root on glibc-based Linux systems, in the default configuration.

The name is a pun: it is a regression, meaning an old bug that came back. Qualys says it reintroduces CVE-2006-5051, which was fixed in 2006, and that the change that brought it back arrived in OpenSSH 8.5p1 in October 2020.

Which versions? Qualys lists: earlier than 4.4p1 (unless patched for the 2006 and 2008 bugs), and 8.5p1 up to but not including 9.8p1. The OpenSSH team’s own 9.8 release note says versions 8.5p1 to 9.7p1 inclusive, and that OpenBSD is not vulnerable. Qualys adds that, per Microsoft, Windows installations are not vulnerable.

How it works

  1. A client connects to sshd and does not finish logging in.
  2. sshd has a login timer, set by LoginGraceTime. The flaw sits in how sshd handles that timer firing, which is why setting it to 0 is the stop-gap.
  3. Because of the race, a badly timed signal can corrupt memory.
  4. With enough attempts an attacker may turn that into code running as root.

It is hard. OpenSSH says successful exploitation was shown on 32-bit Linux with glibc and ASLR, taking on average 6 to 8 hours of continuous connections in lab conditions, and that 64-bit exploitation was believed possible but not demonstrated at the time. Qualys says it does not release its exploit.

Who it affects and how badly

Any business with an internet-facing Linux server running an affected OpenSSH: SaaS start-ups, MSP jump hosts, web agencies, manufacturers with remote-managed Linux devices. Qualys reported, via Censys and Shodan, over 14 million potentially vulnerable instances exposed to the internet.

  • Small: one hosted server taken over means site downtime and rebuild.
  • Mid-sized: a root foothold on a server inside the network is a base for moving sideways.
  • Regulated: a root compromise on a system holding personal or payment data can trigger breach notification duties.

Real examples

The Qualys advisory and the OpenSSH 9.8 release note are the primary records. No in-the-wild breach is cited here because none was confirmed in a source opened for this entry.

Worked example (illustration only)

A 15-person software firm leaves SSH open to the whole internet on an Ubuntu server that has not been updated for two years. The firm never looked at the OpenSSH version. It is in the vulnerable range. Cost if abused: a day to rebuild, rotate every key stored there and tell customers. Cost of the fix: a package update and a firewall rule limiting SSH to the office address.

below 4.4p1*4.4p1 to before 8.5p1: not vulnerable8.5p1 to 9.7p19.8+*unless patched for CVE-2006-5051 and CVE-2008-4109. Distributions may back-port fixes.

What we check on a test

  • Whether SSH is reachable from the internet at all, and on which ports.
  • The reported OpenSSH version, treated as a lead only. Qualys notes remote checks rely on the banner and so report a potential, not a confirmed, finding.
  • On systems we are given access to, the installed package and the distribution’s security notice.
  • The LoginGraceTime setting and whether firewall rules limit who can reach sshd.
  • Whether password login is on, and whether SSH keys are protected.

How to detect it

  1. List every server with SSH reachable from outside: your firewall rules and a scan of your own address ranges.
  2. Check the installed version on each (ssh -V on the server) and the distribution’s security notice for CVE-2024-6387.
  3. Remember a banner may show an old version string on a patched, back-ported package.
  4. Qualys says attempts can show as many “Timeout before authentication” lines in the logs.
  5. Watch for many half-open connections to port 22 from one address.

How to fix or prevent it

  1. Update OpenSSH to 9.8p1 or later, or install your distribution’s patched package.
  2. Limit SSH to known addresses or a VPN with firewall rules.
  3. If you cannot update yet, set LoginGraceTime to 0. Qualys says this blocks the code execution risk but makes denial of service easier.
  4. Use key-based login and turn off password login.
  5. Keep OpenSSH 9.8 or later features on: the release adds PerSourcePenalties, which blocks addresses that repeatedly fail or connect without finishing.
  6. Put patching of internet-facing servers on a regular schedule.

Related terms

port 22 ssh, cisa kev, patch management, how lateral movement works

FAQ

Is Windows affected? Qualys says, per Microsoft, Windows installations are not vulnerable.

Is it easy to exploit? OpenSSH describes lab exploitation on 32-bit systems taking hours of continuous connections.

What is the quickest stop-gap? Setting LoginGraceTime to 0, with the denial of service trade-off.

How Wolfcore helps

A Wolfcore penetration test finds this the way an attacker would, by hand, not with a scanner. Start with the free web vulnerability scan or see penetration testing

Wolfcore

Would your staff click a phishing email?

Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.

Start a free phishing testFree website security scanor book a 30 minute call