Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is regreSSHion?

regreSSHion (CVE-2024-6387) is an unauthenticated remote root vulnerability in OpenSSH caused by a signal handler race condition—a bug fixed in 2006 and accidentally reintroduced in 2020.

Illustration for the cybersecurity term regreSSHion
Home / Blog / Cybersecurity Terms / What Is regreSSHion?
17 November 2026

What Is regreSSHion?

What Is regreSSHion?

regreSSHion is CVE-2024-6387, an unauthenticated remote code execution vulnerability in the OpenSSH server, disclosed by the Qualys Threat Research Unit on 1 July 2024. It allows an attacker who can reach the SSH port to execute code as root without any credentials. The name combines “regression” with SSH, because the underlying defect had been found and fixed eighteen years earlier and was then reintroduced by an unrelated code change.

The Race Condition

OpenSSH limits how long a client may take to authenticate, controlled by LoginGraceTime and set to 120 seconds by default. When that timer expires, the server raises SIGALRM, and the signal handler logs the failure and terminates the connection.

Signal handlers run asynchronously, interrupting whatever the process was doing. That imposes a strict rule: a handler may only call functions that are async-signal-safe. The OpenSSH handler calls syslog, which is not—it allocates memory through malloc. If the alarm fires while the main thread is already inside a memory allocation routine, the allocator’s internal state is re-entered mid-update and corrupted.

Qualys showed that an attacker who controls the timing and content of the data sent before the timeout can shape that corruption into arbitrary code execution. The process is running as root at that point, because privilege separation has not yet dropped privileges for an unauthenticated connection on glibc-based Linux systems.

A Fix That Came Undone

The identical issue was reported in 2006 as CVE-2006-5051 and addressed by wrapping the unsafe call in a compile-time guard, DO_LOG_SAFE_IN_SIGHAND. In October 2020, during refactoring for OpenSSH 8.5p1, that directive was removed. Nobody noticed that it had been load bearing.

The affected range is therefore specific: OpenSSH 8.5p1 up to and including 9.7p1 on glibc-based Linux are vulnerable. Versions from 4.4p1 up to 8.5p1 are not, because the guard was present. OpenBSD is unaffected entirely, since it has had a safe syslog implementation since 2001. Systems using musl, such as Alpine Linux, are not exploitable by the published method.

This is a useful argument for keeping regression tests for security fixes, not merely for functionality. A test that confirmed the guard was still compiled in would have caught the change in 2020.

How Hard Is It to Exploit?

Harder than the severity suggests, at least initially. Qualys demonstrated the attack on 32-bit x86 with ASLR enabled, requiring roughly 10,000 connection attempts and six to eight hours of continuous effort against a single target. No working 64-bit exploit was published at disclosure, though the researchers expected one to follow given time.

That difficulty bought defenders breathing room, but it should not be read as safety. Exploitation is noisy—thousands of connections that fail to authenticate—so an unpatched server with any log monitoring at all should produce an obvious signal, which is unusual and worth taking advantage of.

Remediation

The Pattern

regreSSHion sits with PwnKit and Looney Tunables as another Qualys finding in long-trusted privileged code. The specific lesson here is different from theirs, though: this was not an undiscovered bug but a known one that came back. Security-relevant code deserves comments explaining why it exists and tests that fail if it is removed, because the next maintainer will not have the context that the original author did.

Our Infrastructure Security Testing Services include external exposure review, which routinely finds SSH reachable from the internet on hosts where nobody intended it to be.

FAQ – Frequently Asked Questions

Which OpenSSH Versions Are Affected?

OpenSSH 8.5p1 through 9.7p1 on glibc-based Linux systems. Versions from 4.4p1 up to but not including 8.5p1 are not vulnerable, because the protective compile-time guard was present during that period. OpenBSD is unaffected, and systems using the musl C library, such as Alpine Linux, are not exploitable by the published technique. Always confirm against your distribution’s own advisory.

Is Setting LoginGraceTime to Zero Safe?

It prevents exploitation, because the alarm signal that triggers the race never fires, but it introduces a denial of service risk. Unauthenticated connections are no longer timed out, so an attacker can hold open connection slots until the server refuses new sessions. If you use it as a temporary measure, reduce MaxStartups accordingly and patch as soon as a maintenance window allows.

How Was a Fixed Vulnerability Reintroduced?

The 2006 fix was a compile-time directive that kept an unsafe logging call out of the signal handler. During a 2020 refactor the directive was removed, which looked like tidying up dead configuration rather than deleting a security control. There was no test that failed when it disappeared, so the regression went unnoticed through nearly four years of releases.

Should SSH Be Exposed to the Internet at All?

Rarely. Most organisations can place SSH behind a VPN or a bastion host and restrict access by source address, which removes exposure to this class of vulnerability entirely. Where internet exposure is unavoidable, use key-based authentication only, disable password authentication, apply rate limiting, and monitor for the connection patterns that unsuccessful exploitation produces.

Related Terms

You May Be Interested In These

What Is a Format String Vulnerability?

Cybersecurity Terms

17 November 2026

What Is a Format String Vulnerability?

Read More
What Is the GoAnywhere MFT Vulnerability?

Cybersecurity Terms

17 November 2026

What Is the GoAnywhere MFT Vulnerability?

Read More
What Is Server-Side Request Forgery?

Cybersecurity Terms

17 November 2026

What Is Server-Side Request Forgery?

Read More