CVE-2024-6387Openssh: regresshion - race condition in ssh allows rce/dos
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | openssh | Fixed | 1:9.6p1-3ubuntu13.3 | UBUNTU-CVE-2024-6387 |
| Ubuntu 24.04 | openssh-ssh1 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | openssh | Fixed | 1:8.9p1-3ubuntu0.10 | UBUNTU-CVE-2024-6387 |
| Ubuntu 22.04 | openssh-ssh1 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | openssh-ssh1 | Not affected vulnerable_code_not_present | ||
| Debian 14 | openssh | Fixed | 1:9.7p1-7 | DEBIAN-CVE-2024-6387 |
| Debian 13 | openssh | Fixed | 1:9.7p1-7 | DEBIAN-CVE-2024-6387 |
| Debian 12 | openssh | Fixed | 1:9.2p1-2+deb12u3 | DEBIAN-CVE-2024-6387 |
| Red Hat Enterprise Linux 10 | openssh | Not affected | ||
| Red Hat Enterprise Linux 10 | openssh-askpass | Not affected | ||
| Red Hat Enterprise Linux 10 | openssh-clients | Not affected | ||
| Red Hat Enterprise Linux 10 | openssh-keycat | Not affected | ||
| Red Hat Enterprise Linux 10 | openssh-keysign | Not affected | ||
| Red Hat Enterprise Linux 10 | openssh-server | Not affected | ||
| Red Hat Enterprise Linux 9 | openssh | Fixed | 0:8.7p1-38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9 | openssh-askpass | Fixed | 0:8.7p1-38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9 | openssh-clients | Fixed | 0:8.7p1-38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9 | openssh-keycat | Fixed | 0:8.7p1-38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9 | openssh-server | Fixed | 0:8.7p1-38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9 | pam_ssh_agent_auth | Fixed | 0:0.10.4-5.38.el9_4.1 | RHSA-2024:4312 |
| Red Hat Enterprise Linux 8 | openssh | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-askpass | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-cavs | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-clients | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-keycat | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-ldap | Not affected | ||
| Red Hat Enterprise Linux 8 | openssh-server | Not affected | ||
| Red Hat Enterprise Linux 8 | pam_ssh_agent_auth | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-askpass | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-cavs | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-clients | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-keycat | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-ldap | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-server | Not affected | ||
| Red Hat Enterprise Linux 7 | openssh-server-sysvinit | Not affected | ||
| Red Hat Enterprise Linux 7 | pam_ssh_agent_auth | Not affected | ||
| Red Hat Enterprise Linux 6 | openssh | Not affected | ||
| Red Hat Enterprise Linux 6 | openssh-askpass | Not affected | ||
| Red Hat Enterprise Linux 6 | openssh-clients | Not affected | ||
| Red Hat Enterprise Linux 6 | openssh-ldap | Not affected | ||
| Red Hat Enterprise Linux 6 | openssh-server | Not affected | ||
| Red Hat Enterprise Linux 6 | pam_ssh_agent_auth | Not affected | ||
| AlmaLinux 9 | openssh | Fixed | 8.7p1-38.el9_4.1 | ALSA-2024:4312 |
| AlmaLinux 9 | openssh-askpass | Fixed | 8.7p1-38.el9_4.1 | ALSA-2024:4312 |
| AlmaLinux 9 | openssh-clients | Fixed | 8.7p1-38.el9_4.1 | ALSA-2024:4312 |
| AlmaLinux 9 | openssh-keycat | Fixed | 8.7p1-38.el9_4.1 | ALSA-2024:4312 |
| AlmaLinux 9 | openssh-server | Fixed | 8.7p1-38.el9_4.1 | ALSA-2024:4312 |
| AlmaLinux 9 | pam_ssh_agent_auth | Fixed | 0.10.4-5.38.el9_4.1 | ALSA-2024:4312 |
| Alpine Linux 3.24 | openssh | Fixed | 9.8_p1-r0 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.23 | openssh | Fixed | 9.8_p1-r0 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.22 | openssh | Fixed | 9.8_p1-r0 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.21 | openssh | Fixed | 9.8_p1-r0 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.20 | openssh | Fixed | 9.7_p1-r4 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.19 | openssh | Fixed | 9.6_p1-r1 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.18 | openssh | Fixed | 9.3_p2-r2 | ALPINE-CVE-2024-6387 |
| Alpine Linux 3.17 | openssh | Fixed | 9.1_p1-r6 | ALPINE-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.
- OpenSSH: affected: 8.5p1 to 9.7p1
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
- Red Hat Enterprise Linux 9.2 Extended Update Support
- Red Hat OpenShift Container Platform 4.13
- Red Hat OpenShift Container Platform 4.14
- Red Hat OpenShift Container Platform 4.15
- Red Hat OpenShift Container Platform 4.16
- Red Hat Ceph Storage 5
- Red Hat Ceph Storage 6
- Red Hat Ceph Storage 7
- Red Hat Enterprise Linux 10
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:
- https://access.redhat.com/errata/RHSA-2024:4312 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:4340 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:4389 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:4469 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:4474 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:4479 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2024:4312
- https://access.redhat.com/errata/RHSA-2024:4340
- https://access.redhat.com/errata/RHSA-2024:4389
- https://access.redhat.com/errata/RHSA-2024:4469
- https://access.redhat.com/errata/RHSA-2024:4474
- https://access.redhat.com/errata/RHSA-2024:4479
- https://access.redhat.com/errata/RHSA-2024:4484
- https://access.redhat.com/security/cve/CVE-2024-6387
- https://bugzilla.redhat.com/show_bug.cgi?id=2294604
- https://santandersecurityresearch.github.io/blog/sshing_the_masses.html
- https://www.openssh.com/txt/release-9.8
- https://www.qualys.com/2024/07/01/cve-2024-6387/regresshion.txt
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.