CVEfocus › CVE database › CVE-2024-6387

CVE-2024-6387Openssh: regresshion - race condition in ssh allows rce/dos

CVSS 8.1 HighEPSS 60.5% (in the top 1% of all CVEs)Published 2024-07-01Updated 2026-11-23Assigner: redhat

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.

CWE-364

What to do

Likely to be exploited: EPSS gives a 61% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

25Fixed
32Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04opensshFixed1:9.6p1-3ubuntu13.3UBUNTU-CVE-2024-6387
Ubuntu 24.04openssh-ssh1Not affected
vulnerable_code_not_present
Ubuntu 22.04opensshFixed1:8.9p1-3ubuntu0.10UBUNTU-CVE-2024-6387
Ubuntu 22.04openssh-ssh1Not affected
vulnerable_code_not_present
Ubuntu 20.04openssh-ssh1Not affected
vulnerable_code_not_present
Debian 14opensshFixed1:9.7p1-7DEBIAN-CVE-2024-6387
Debian 13opensshFixed1:9.7p1-7DEBIAN-CVE-2024-6387
Debian 12opensshFixed1:9.2p1-2+deb12u3DEBIAN-CVE-2024-6387
Red Hat Enterprise Linux 10opensshNot affected
Red Hat Enterprise Linux 10openssh-askpassNot affected
Red Hat Enterprise Linux 10openssh-clientsNot affected
Red Hat Enterprise Linux 10openssh-keycatNot affected
Red Hat Enterprise Linux 10openssh-keysignNot affected
Red Hat Enterprise Linux 10openssh-serverNot affected
Red Hat Enterprise Linux 9opensshFixed0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 9openssh-askpassFixed0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 9openssh-clientsFixed0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 9openssh-keycatFixed0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 9openssh-serverFixed0:8.7p1-38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 9pam_ssh_agent_authFixed0:0.10.4-5.38.el9_4.1RHSA-2024:4312
Red Hat Enterprise Linux 8opensshNot affected
Red Hat Enterprise Linux 8openssh-askpassNot affected
Red Hat Enterprise Linux 8openssh-cavsNot affected
Red Hat Enterprise Linux 8openssh-clientsNot affected
Red Hat Enterprise Linux 8openssh-keycatNot affected
Red Hat Enterprise Linux 8openssh-ldapNot affected
Red Hat Enterprise Linux 8openssh-serverNot affected
Red Hat Enterprise Linux 8pam_ssh_agent_authNot affected
Red Hat Enterprise Linux 7opensshNot affected
Red Hat Enterprise Linux 7openssh-askpassNot affected
Red Hat Enterprise Linux 7openssh-cavsNot affected
Red Hat Enterprise Linux 7openssh-clientsNot affected
Red Hat Enterprise Linux 7openssh-keycatNot affected
Red Hat Enterprise Linux 7openssh-ldapNot affected
Red Hat Enterprise Linux 7openssh-serverNot affected
Red Hat Enterprise Linux 7openssh-server-sysvinitNot affected
Red Hat Enterprise Linux 7pam_ssh_agent_authNot affected
Red Hat Enterprise Linux 6opensshNot affected
Red Hat Enterprise Linux 6openssh-askpassNot affected
Red Hat Enterprise Linux 6openssh-clientsNot affected
Red Hat Enterprise Linux 6openssh-ldapNot affected
Red Hat Enterprise Linux 6openssh-serverNot affected
Red Hat Enterprise Linux 6pam_ssh_agent_authNot affected
AlmaLinux 9opensshFixed8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux 9openssh-askpassFixed8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux 9openssh-clientsFixed8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux 9openssh-keycatFixed8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux 9openssh-serverFixed8.7p1-38.el9_4.1ALSA-2024:4312
AlmaLinux 9pam_ssh_agent_authFixed0.10.4-5.38.el9_4.1ALSA-2024:4312
Alpine Linux 3.24opensshFixed9.8_p1-r0ALPINE-CVE-2024-6387
Alpine Linux 3.23opensshFixed9.8_p1-r0ALPINE-CVE-2024-6387
Alpine Linux 3.22opensshFixed9.8_p1-r0ALPINE-CVE-2024-6387
Alpine Linux 3.21opensshFixed9.8_p1-r0ALPINE-CVE-2024-6387
Alpine Linux 3.20opensshFixed9.7_p1-r4ALPINE-CVE-2024-6387
Alpine Linux 3.19opensshFixed9.6_p1-r1ALPINE-CVE-2024-6387
Alpine Linux 3.18opensshFixed9.3_p2-r2ALPINE-CVE-2024-6387
Alpine Linux 3.17opensshFixed9.1_p1-r6ALPINE-CVE-2024-6387

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: 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…

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.