cve.bz

CVE-2024-6387 (regreSSHion) Race Condition

8.1 highExploitEPSS 99.5%Fix available

High (8.1). EPSS 99.5% estimated probability of exploitation activity in the next 30 days.

On this page
A security regression (CVE-2006-5051) was discovered in OpenSSH's server (sshd). There is a race condition which can lead sshd to handle some signals in an unsafe manner. An unauthenticated, remote attacker may be able to trigger it by failing to authenticate within a set time period.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
99.5% (unchanged from 99.5% a week ago; 99.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-07-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
CWE-364 Signal Handler Race Condition
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-6387 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-6387?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-6387?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-6387 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2024-6387

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2024-6387](https://cve.bz/cve/badge/CVE-2024-6387.svg)](https://cve.bz/cve/CVE-2024-6387)

HTML:

<a href="https://cve.bz/cve/CVE-2024-6387"><img src="https://cve.bz/cve/badge/CVE-2024-6387.svg" alt="CVE-2024-6387"></a>

Affected

Versions

From the CNA's record in the CVE List.

Fixed in

ProductFixed in
Red Hat Enterprise Linux 90:8.7p1-38.el9_4.1
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions0:8.7p1-12.el9_0.1
Red Hat Enterprise Linux 9.2 Extended Update Support0:8.7p1-30.el9_2.4
Red Hat OpenShift Container Platform 4.13413.92.202407091321-0
Red Hat OpenShift Container Platform 4.14414.92.202407091253-0
Red Hat OpenShift Container Platform 4.15415.92.202407091355-0
Red Hat OpenShift Container Platform 4.16416.94.202407081958-0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12openssh1:9.2p1-2+deb12u3DEBIAN-CVE-2024-6387 DSA-5724-1
Debian13, 14openssh1:9.7p1-7DEBIAN-CVE-2024-6387
Ubuntu22.04:LTSopenssh1:8.9p1-3ubuntu0.10UBUNTU-CVE-2024-6387 USN-6859-1
Ubuntu24.04:LTSopenssh1:9.6p1-3ubuntu13.3UBUNTU-CVE-2024-6387 USN-6859-1
Red Hatenterprise_linux:9::appstreamopenssh-askpass, openssh-debuginfo, openssh-debugsource and 5 more0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hatenterprise_linux:9::appstreampam_ssh_agent_auth, pam_ssh_agent_auth-debuginfo0:0.10.4-5.38.el9_4.1RHSA-2024:4312
Red Hatenterprise_linux:9::baseosopenssh, openssh-keycat, openssh-server and 8 more0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hatenterprise_linux:9::baseospam_ssh_agent_auth-debuginfo0:0.10.4-5.38.el9_4.1RHSA-2024:4312
Red Hatrhel_e4s:9.0::appstreamopenssh-askpass, openssh-debuginfo, openssh-debugsource and 4 more0:8.7p1-12.el9_0.1RHSA-2024:4389
Red Hatrhel_e4s:9.0::appstreampam_ssh_agent_auth, pam_ssh_agent_auth-debuginfo0:0.10.4-4.12.el9_0.1RHSA-2024:4389
Red Hatrhel_e4s:9.0::baseosopenssh, openssh-keycat, openssh-server and 7 more0:8.7p1-12.el9_0.1RHSA-2024:4389
Red Hatrhel_e4s:9.0::baseospam_ssh_agent_auth-debuginfo0:0.10.4-4.12.el9_0.1RHSA-2024:4389
Red Hatrhel_eus:9.2::appstreamopenssh-askpass, openssh-debuginfo, openssh-debugsource and 5 more0:8.7p1-30.el9_2.4RHSA-2024:4340
Red Hatrhel_eus:9.2::appstreampam_ssh_agent_auth, pam_ssh_agent_auth-debuginfo0:0.10.4-5.30.el9_2.4RHSA-2024:4340
Red Hatrhel_eus:9.2::baseosopenssh, openssh-keycat, openssh-server and 8 more0:8.7p1-30.el9_2.4RHSA-2024:4340
Red Hatrhel_eus:9.2::baseospam_ssh_agent_auth-debuginfo0:0.10.4-5.30.el9_2.4RHSA-2024:4340
SUSELinux Enterprise Module for Basesystem 15 SP6openssh9.6p1-150600.6.3.1SUSE-SU-2024:2275-1
SUSELinux Enterprise Module for Desktop Applications 15 SP6openssh-askpass-gnome9.6p1-150600.6.3.1SUSE-SU-2024:2275-1
SUSELinux Micro 6.0openssh9.6p1-2.1SUSE-SU-2025:20009-1
openSUSELeap 15.6openssh, openssh-askpass-gnome9.6p1-150600.6.3.1SUSE-SU-2024:2275-1 SUSE-SU-2024:2275-2
openSUSETumbleweedopenssh9.6p1-10.1openSUSE-SU-2024:14088-1
AlmaLinux9openssh, openssh-keycat, openssh-server and 2 more8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux9pam_ssh_agent_auth0.10.4-5.38.el9_4.1ALSA-2024:4312
Alpinev3.17openssh9.1_p1-r6ALPINE-CVE-2024-6387
Alpinev3.18openssh9.3_p2-r2ALPINE-CVE-2024-6387
Alpinev3.19openssh9.6_p1-r1ALPINE-CVE-2024-6387
Alpinev3.20openssh9.7_p1-r4ALPINE-CVE-2024-6387
Alpinev3.21, v3.22, v3.23 and 1 moreopenssh9.8_p1-r0ALPINE-CVE-2024-6387
Azure Linux2openssh8.9p1-6AZL-43030
Azure Linux3openssh9.8p1-1AZL-43024
Alpaquita23openssh9.1_p1-r8BELL-CVE-2024-6387
Alpaquitastreamopenssh9.8_p1-r0BELL-CVE-2024-6387
BellSoft Hardened Containers23openssh9.1_p1-r8BELL-CVE-2024-6387
BellSoft Hardened Containersstreamopenssh9.8_p1-r0BELL-CVE-2024-6387

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat rates the severity of this flaw as Important for both Red Hat Enterprise Linux (RHEL) and OpenShift Container Platform (OCP). The most significant risk is Remote Code Execution, however this outcome requires significant resources to exploit. If mitigations are put in place, the consequences of exploitation are reduced. An attacker would then only be able to impact availability of the OpenSSH service.

The main factor preventing a higher impact rating is an unpredictable race condition. All actively supported versions of RHEL (and by extension OCP) have ExecShield (aka ASLR) enabled by default and utilize NX technology, reducing reliability of the attack. Attackers are forced to retry the attack thousands of times. This generates significant noise providing defenders with an opportunity to detect and disrupt potential attacks.

RHEL 9 is the only affected version. RHEL 6, 7, and 8 all utilize an older version of OpenSSH which was never affected by this vulnerability.

The affected versions of OCP are 4.13, 4.14, 4.15, and 4.16 as they include the affected version of OpenSSH in the underlying operating system Red Hat CoreOS (RHCOS). 4.12 and earlier versions of OCP are not affected.

Red Hat's mitigation

The below process can protect against a Remote Code Execution attack by disabling the LoginGraceTime parameter on Red Hat Enterprise Linux 9. However, the sshd server is still vulnerable to a Denial of Service if an attacker exhausts all the connections.

1) As root user, open the /etc/ssh/sshd_config

2) Add or edit the parameter configuration:

~~~

LoginGraceTime 0

~~~

3) Save and close the file

4) Restart the sshd daemon:

~~~

systemctl restart sshd.service

~~~

Setting LoginGraceTime to 0 disables the SSHD server's ability to drop connections if authentication is not completed within the specified timeout. If this mitigation is implemented, it is highly recommended to use a tool like 'fail2ban' alongside a firewall to monitor log files and manage connections appropriately.

If any of the mitigations mentioned above is used, please note that the removal of LoginGraceTime parameter from sshd_config is not automatic when the updated package is installed.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9openssh-0:8.7p1-38.el9_4.1Fixed 2024-07-03RHSA-2024:4312
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionsopenssh-0:8.7p1-12.el9_0.1Fixed 2024-07-08RHSA-2024:4389
Red Hat Enterprise Linux 9.2 Extended Update Supportopenssh-0:8.7p1-30.el9_2.4Fixed 2024-07-05RHSA-2024:4340
Red Hat OpenShift Container Platform 4.13openshift/ose-rhel-coreos-9:413.92.202407091321-0Fixed 2024-07-17RHSA-2024:4484
Red Hat OpenShift Container Platform 4.14openshift/ose-rhel-coreos-9:414.92.202407091253-0Fixed 2024-07-17RHSA-2024:4479
Red Hat OpenShift Container Platform 4.15openshift/ose-rhel-coreos-9:415.92.202407091355-0Fixed 2024-07-18RHSA-2024:4474
Red Hat OpenShift Container Platform 4.16openshift/ose-rhel-coreos-9:416.94.202407081958-0Fixed 2024-07-16RHSA-2024:4469
Red Hat Ceph Storage 5opensshNot affected
Red Hat Ceph Storage 6opensshNot affected
Red Hat Ceph Storage 7opensshNot affected
Red Hat Enterprise Linux 10opensshNot affected
Red Hat Enterprise Linux 6opensshNot affected
Red Hat Enterprise Linux 7opensshNot affected
Red Hat Enterprise Linux 8opensshNot affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-6387.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-25-162-05Siemens SIMATIC S7-1500 CPU family2025-06-10EnergySIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed
ICSA-25-100-09ABB Arctic Wireless Gateways2025-04-07EnergyArctic ARG600 with firmware version>=3.4.10 to <=3.4.13, Arctic ARC600 with firmware version>=3.4.10 to <=3.4.13, Arctic ARR600 with firmware version>=3.4.10 to <=3.4.13 and 1 morenone listed
ICSA-24-256-15Siemens Industrial Products2024-09-10Critical ManufacturingIndustrial Edge Management OS (IEM-OS), SINAMICS IIoT module, SINEMA Remote Connect Server and 1 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

4 more

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Emerging Threats Open ET INFO Server Responded with Vulnerable OpenSSH Version (CVE-2024-6387) sid 2054218

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON