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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 60.50% (percentile 99, 2026-11-26)
- **CWE:** CWE-364
- **Aliases:** EDB-52269
- **Published:** 2024-07-01T12:37:25.431Z
- **Modified:** 2026-11-23T15:17:12.687Z

## Who should check

- Anyone running OpenSSH \>= 8.5p1, \<= 9.7p1
- Anyone running Red Hat Enterprise Linux 9 all versions
- Anyone running Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions all versions
- Anyone running Red Hat Enterprise Linux 9.2 Extended Update Support all versions
- Anyone running Red Hat OpenShift Container Platform 4.13 all versions
- Anyone running Red Hat OpenShift Container Platform 4.14 all versions
- Anyone running Red Hat OpenShift Container Platform 4.15 all versions
- Anyone running Red Hat OpenShift Container Platform 4.16 all versions

## Description

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.

## Affected and fixed versions

- OpenSSH: \>= 8.5p1, \<= 9.7p1 (cvelist)
- Red Hat Enterprise Linux 9: all versions (cvelist)
- Red Hat Enterprise Linux 9: all versions (cvelist)
- Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions: all versions (cvelist)
- Red Hat Enterprise Linux 9.2 Extended Update Support: all versions (cvelist)
- Red Hat OpenShift Container Platform 4.13: all versions (cvelist)
- Red Hat OpenShift Container Platform 4.14: all versions (cvelist)
- Red Hat OpenShift Container Platform 4.15: all versions (cvelist)
- Red Hat OpenShift Container Platform 4.16: all versions (cvelist)
- Red Hat Ceph Storage 5: see vendor advisory (cvelist)
- Red Hat Ceph Storage 6: see vendor advisory (cvelist)
- Red Hat Ceph Storage 7: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 10: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 6: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 7: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 8: see vendor advisory (cvelist)
- Red Hat OpenShift Container Platform 4: all versions (cvelist)

## Mitigation

- Vendor 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 sshd\_config is not automatic when the updated package is installed.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-6387. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-6387.md
Affected: OpenSSH >= 8.5p1, <= 9.7p1; Red Hat Enterprise Linux 9 all versions; Red Hat Enterprise Linux 9 all versions; Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions all versions; Red Hat Enterprise Linux 9.2 Extended Update Support all versions; Red Hat OpenShift Container Platform 4.13 all…
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for OpenSSH, 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: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-6387 being exploited?

There is no confirmed exploitation: CVE-2024-6387 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 60.50% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-6387?

High: CVSS 8.1 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-6387?

OpenSSH \>= 8.5p1, \<= 9.7p1; Red Hat Enterprise Linux 9 all versions; Red Hat Enterprise Linux 9 all versions; Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions all versions; Red Hat Enterprise Linux 9.2 Extended Update Support all versions; Red Hat OpenShift Container Platform 4.13 all versions; Red Hat OpenShift Container Platform 4.14 all versions; Red Hat OpenShift Container Platform 4.15 all versions; Red Hat OpenShift Container Platform 4.16 all versions; Red Hat Ceph Storage 5; Red Hat Ceph Storage 6; Red Hat Ceph Storage 7; Red Hat Enterprise Linux 10; Red Hat Enterprise Linux 6; Red Hat Enterprise Linux 7; Red Hat Enterprise Linux 8; Red Hat OpenShift Container Platform 4 all versions.

### Is there a fix for CVE-2024-6387?

No fixed version is listed in the sources yet. Vendor 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 sshd\_config is not automatic when the updated package is installed.

### How do I check if I'm affected by CVE-2024-6387?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2024:4312>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4340>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4389>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4469>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4474>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4479>
- vendor: <https://access.redhat.com/errata/RHSA-2024:4484>
- patch: <http://www.openwall.com/lists/oss-security/2024/07/03/3>
- patch: <https://github.com/openela-main/openssh/commit/e1f438970e5a337a17070a637c1b9e19697cad09>
- patch: <https://lists.mindrot.org/pipermail/openssh-unix-dev/2024-July/041431.html>
- patch: <https://news.ycombinator.com/item?id=40843778>
- exploit: <https://santandersecurityresearch.github.io/blog/sshing_the_masses.html>
- exploit: <https://www.qualys.com/2024/07/01/cve-2024-6387/regresshion.txt>
- exploit: <https://www.vicarius.io/vsociety/posts/regresshion-an-openssh-regression-error-cve-2024-6387>
- exploit: <https://www.exploit-db.com/exploits/52269>
- exploit: <https://packetstorm.news/files/id/190587/>
- exploit: <http://www.openwall.com/lists/oss-security/2024/07/03/11>
- exploit: <http://www.openwall.com/lists/oss-security/2024/07/04/2>
- exploit: <http://www.openwall.com/lists/oss-security/2024/07/08/2>
- exploit: <http://www.openwall.com/lists/oss-security/2024/07/09/5>
- exploit: <http://www.openwall.com/lists/oss-security/2024/07/10/1>
- article: <https://arstechnica.com/security/2024/07/regresshion-vulnerability-in-openssh-gives-attackers-root-on-linux/>
- article: <https://blog.qualys.com/vulnerabilities-threat-research/2024/07/01/regresshion-remote-unauthenticated-code-execution-vulnerability-in-openssh-server>
- article: <https://stackdiary.com/openssh-race-condition-in-sshd-allows-remote-code-execution/>
- article: <https://www.theregister.com/2024/07/01/regresshion_openssh/>
- other: <https://access.redhat.com/security/cve/CVE-2024-6387>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2294604>
- other: <https://www.openssh.com/txt/release-9.8>
- other: <http://www.openwall.com/lists/oss-security/2024/07/01/12>
- other: <http://www.openwall.com/lists/oss-security/2024/07/01/13>
- other: <http://www.openwall.com/lists/oss-security/2024/07/02/1>
- other: <http://www.openwall.com/lists/oss-security/2024/07/03/1>
- other: <http://www.openwall.com/lists/oss-security/2024/07/03/2>
- other: <http://www.openwall.com/lists/oss-security/2024/07/03/4>
- other: <http://www.openwall.com/lists/oss-security/2024/07/03/5>
- other: <http://www.openwall.com/lists/oss-security/2024/07/04/1>
- other: <http://www.openwall.com/lists/oss-security/2024/07/08/3>
- other: <http://www.openwall.com/lists/oss-security/2024/07/09/2>
- other: <http://www.openwall.com/lists/oss-security/2024/07/10/2>
- other: <http://www.openwall.com/lists/oss-security/2024/07/10/3>
- other: <http://www.openwall.com/lists/oss-security/2024/07/10/4>
- other: <http://www.openwall.com/lists/oss-security/2024/07/10/6>
- other: <http://www.openwall.com/lists/oss-security/2024/07/11/1>
- other: <http://www.openwall.com/lists/oss-security/2024/07/11/3>
- other: <http://www.openwall.com/lists/oss-security/2024/07/23/4>
- other: <http://www.openwall.com/lists/oss-security/2024/07/23/6>
- other: <http://www.openwall.com/lists/oss-security/2024/07/28/2>
- other: <http://www.openwall.com/lists/oss-security/2024/07/28/3>
- other: <https://archlinux.org/news/the-sshd-service-needs-to-be-restarted-after-upgrading-to-openssh-98p1/>
- other: <https://explore.alas.aws.amazon.com/CVE-2024-6387.html>
- other: <https://forum.vmssoftware.com/viewtopic.php?f=8&t=9132>
- other: <https://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2024-002.txt.asc>
- other: <https://github.com/AlmaLinux/updates/issues/629>
- other: <https://github.com/Azure/AKS/issues/4379>
- other: <https://github.com/PowerShell/Win32-OpenSSH/discussions/2248>
- other: <https://github.com/PowerShell/Win32-OpenSSH/issues/2249>
- other: <https://github.com/microsoft/azurelinux/issues/9555>
- other: <https://github.com/oracle/oracle-linux/issues/149>
- other: <https://github.com/rapier1/hpn-ssh/issues/87>
- other: <https://github.com/zgzhang/cve-2024-6387-poc>
- other: <https://lists.almalinux.org/archives/list/announce@lists.almalinux.org/thread/23BF5BMGFVEVUI2WNVAGMLKT557EU7VY/>
- other: <https://lists.mindrot.org/pipermail/openssh-unix-announce/2024-July/000158.html>
- other: <https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0010>
- other: <https://security-tracker.debian.org/tracker/CVE-2024-6387>
- other: <https://security.netapp.com/advisory/ntap-20240701-0001/>
- other: <https://sig-security.rocky.page/issues/CVE-2024-6387/>
- other: <https://ubuntu.com/security/CVE-2024-6387>
- other: <https://ubuntu.com/security/notices/USN-6859-1>
- other: <https://www.akamai.com/blog/security-research/2024-openssh-vulnerability-regression-what-to-know-and-do>
- other: <https://www.arista.com/en/support/advisories-notices/security-advisory/19904-security-advisory-0100>
- other: <https://www.freebsd.org/security/advisories/FreeBSD-SA-24:04.openssh.asc>
- other: <https://www.splunk.com/en_us/blog/security/cve-2024-6387-regresshion-vulnerability.html>
- other: <https://www.suse.com/security/cve/CVE-2024-6387.html>
- other: <https://support.apple.com/kb/HT214119>
- other: <https://support.apple.com/kb/HT214118>
- other: <https://support.apple.com/kb/HT214120>
- other: <http://seclists.org/fulldisclosure/2024/Jul/20>
- other: <http://seclists.org/fulldisclosure/2024/Jul/18>
- other: <http://seclists.org/fulldisclosure/2024/Jul/19>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-446545.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-6387>
- Exploit-DB: Exploit metadata (ID and link only) from the Exploit Database <https://www.exploit-db.com/exploits/52269>

HTML: <https://flawdb.com/CVE-2024-6387> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-6387>
