Vulnerability Alert: CVE-2024-6387, dubbed regreSSHion, has been discovered in OpenSSH.

Vulnerability Alert: CVE-2024-6387, dubbed regreSSHion, has been discovered in OpenSSH. Get remediation guidance now.

written by
Eran Segal
published on
July 2, 2024
topic
Vulnerabilities
Application Security

A critical security vulnerability has been discovered in OpenSSH. The flaw, has been assigned CVE-2024-6387 and dubbed "regreSSHion."

This vulnerability could allow unauthenticated remote attackers to execute arbitrary code with root privileges on vulnerable Linux systems with default configurations. It is estimated that there are 14 million vulnerable internet-exposed servers.

The root cause for this vulnerability is a complex race condition in sshd.

Key details about regreSSHion vulnerability

  • The vulnerability impacts OpenSSH server versions ranging from 8.5p1 up to, but not including, 9.7p1 on glibc-based systems. Additionally, versions earlier than 4.4p1 are also affected, unless they have been patched for related vulnerabilities.
  • No indications of exploitations in the wild 
  • Exploitations can take between 6-8 hour on 32-bit. In 64-bit systems, it is estimated to take much more.

RegreSSHion vulnerability background

The vulnerability is a regression of a previously patched 18-year-old flaw (CVE-2006-5051) that was accidentally reintroduced in OpenSSH 8.5p1 in October 2020.

The vulnerability is a signal handler race condition that occurs in the server component (sshd). Specifically, the flaw arises when the SIGALRM handler is triggered due to an authentication timeout (controlled by the LoginGraceTime setting). The handler calls functions that are not async-signal-safe, such as “syslog()”, which can lead to an inconsistent state of the heap.

Researchers have demonstrated successful exploitation on 32-bit Linux/glibc systems with ASLR enabled, typically requiring 6-8 hours of continuous connection attempts. In 64-bit systems, it is estimated to take much more.

The attack leverages the fact that certain memory allocations and deallocations occur during the signal handler execution, allowing an attacker to corrupt heap structures and ultimately gain control of the execution flow. While the vulnerability is present in the default configuration of affected OpenSSH versions, its exploitation is challenging due to the precise timing required and the need to overcome various security mitigations present in modern systems.

Remediation action for CVE-2024-6387 vulnerability:

  • Updating OpenSSH version to a patched version
  • Limiting SSH access through network controls
  • Setting LoginGraceTime to 0 in sshd_config (as a temporary workaround)

Am I affected by CVE-2024-6387?

Due to the complex requirements of this vulnerability and the complexity of the exploitation, it is complex to detect accurately if you’re vulnerable and where. 

Inspecting this vulnerability using the Kodem runtime security platform will help you understand which applications in your environment are vulnerable and prioritize specific images and repos over others.

Kodem detects whether the vulnerable code is active at runtime. If the code is not active, it means that the vulnerability wasn’t exploited and it is possibly not reachable due to endpoint, network configurations, etc.

How to remediate the CVE-2024-6387 vulnerability

How Kodem protects applications against the regreSSHion vulnerability

Kodem's Runtime-Powered SAST scans your source code from the running application and pinpoints exactly where vulnerabilities exist in your code repositories, providing developers with comprehensive information to efficiently fix security issues at their source.

how to fix the CVE-2024-6387 critical vulnerability

We can help protect you against regreSSHion (CVE-2024-6387)

Kodem's runtime security platform stands out in the competitive field of application security due to its emphasis on runtime intelligence, attack chain analysis, and simplification of remediation. We can scan your environment today to discover if you’re really affected by the “regreSSHion” vulnerability. 

Contact us with any questions and we’ll be in touch immediately!

References

https://www.qualys.com/2024/07/01/cve-2024-6387/regresshion.txt‍
https://github.com/acrono/cve-2024-6387-poc

Blog written by

Eran Segal

Security Researcher

More blogs

View all

Kai at Work: A Day in the Life of an AI AppSec Engineer

Kai, Kodem’s secure-by-design AI AppSec Engineer, is integrated directly into the platform to deliver contextualized and actionable answers precisely when AppSec teams need them. By converting your existing security data into conversational intelligence, Kai eliminates the need for hours of manual investigation and context-switching. You can now ask questions as you would to a senior, humble, and tireless engineer.

December 15, 2025

CVE-2025-55182: Remote Code Execution in React Server Components

On December 3, 2025, the React and Vercel teams disclosed CVE-2025-55182, a critical remote-code-execution (RCE) vulnerability (CVSS 10) affecting React Server Components (RSC) as used in the Flight protocol implementation.

December 3, 2025

Shai Hulud 2.0: What We Know About the Ongoing NPM Supply Chain Attack

A new wave of supply chain compromise is unfolding across the open-source ecosystem. Multiple security vendors, including Aikido Security and Wiz have confirmed that the threat actor behind the earlier Shai Hulud malware campaign has resurfaced. This time, compromising NPM accounts, GitHub repositories and widely-used packages associated with Zapier and the ENS (Ethereum Name Service).

November 24, 2025

A Primer on Runtime Intelligence

See how Kodem's cutting-edge sensor technology revolutionizes application monitoring at the kernel level.

5.1k
Applications covered
1.1m
False positives eliminated
4.8k
Triage hours reduced

Platform Overview Video

Watch our short platform overview video to see how Kodem discovers real security risks in your code at runtime.

5.1k
Applications covered
1.1m
False positives eliminated
4.8k
Triage hours reduced

The State of the Application Security Workflow

This report aims to equip readers with actionable insights that can help future-proof their security programs. Kodem, the publisher of this report, purpose built a platform that bridges these gaps by unifying shift-left strategies with runtime monitoring and protection.

Get real-time insights across the full stack…code, containers, OS, and memory

Watch how Kodem’s runtime security platform detects and blocks attacks before they cause damage. No guesswork. Just precise, automated protection.

Stay up-to-date on Audit Nexus

A curated resource for the many updates to cybersecurity and AI risk regulations, frameworks, and standards.