# CVE-2024-6387: RHEL 8 - RCE

> Live exploitation tracking for CVE-2024-6387 by the CrowdSec Live Exploit Tracker, built from real-world attack data crowdsourced from CrowdSec's global network.

Page: https://tracker.crowdsec.net/cves/CVE-2024-6387

## Key facts

- **Exploitation phase:** Background Noise. Continuous low-level scanning or exploitation attempts are observed, mostly opportunistic and automated.
- **CVSS score:** 8.1
- **Public exploit available:** Yes
- **Affected products:** Red Hat Enterprise Linux 8
- **Weaknesses:** CWE-364 (Signal Handler Race Condition); CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'))
- **Tags:** enterprise_software

## 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.

## CrowdSec analysis

[CVE-2024-6387](https://euvd.enisa.europa.eu/vulnerability/CVE-2024-6387) is a vulnerability in OpenSSH’s server (sshd) stemming from a security regression that introduces a race condition, allowing certain signals to be handled unsafely. This flaw enables unauthenticated remote attackers to potentially disrupt the service or execute arbitrary actions by exploiting authentication timing behaviors.

CrowdSec has been tracking this vulnerability and its exploits since 1st of July 2024.

CrowdSec network data shows that most actors exploiting CVE-2024-6387 rely on broad, untargeted scans with minimal filtering. The activity is largely automated and opportunistic in nature.
CrowdSec network telemetry also shows that exploitation of CVE-2024-6387 has significantly declined over the past week. Attack volumes are well below the long-term average, suggesting attackers are rapidly losing interest. The vulnerability appears to be falling out of active use across most threat landscapes.

Attackers usually try to trigger the race condition by repeadedly spamming connection attempts.

## Timeline

- 2024-07-01: CVE Published. CVE-2024-6387 is published to NVD.
- 2024-07-01: Rule Released. CrowdSec releases a rule to detect CVE-2024-6387 exploitation attempts against the CrowdSec Network.
- 2024-07-01: CrowdSec First Seen. CrowdSec observes in-the-wild exploitation of CVE-2024-6387 for the first time.

## 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
- https://security-tracker.debian.org/tracker/CVE-2024-6387
- https://lists.almalinux.org/archives/list/announce@lists.almalinux.org/thread/23BF5BMGFVEVUI2WNVAGMLKT557EU7VY/
- https://sig-security.rocky.page/issues/CVE-2024-6387/
- https://github.com/rapier1/hpn-ssh/issues/87
- https://github.com/oracle/oracle-linux/issues/149
- https://github.com/PowerShell/Win32-OpenSSH/discussions/2248
- https://github.com/openela-main/openssh/commit/e1f438970e5a337a17070a637c1b9e19697cad09
- https://ubuntu.com/security/CVE-2024-6387
- https://archlinux.org/news/the-sshd-service-needs-to-be-restarted-after-upgrading-to-openssh-98p1/
- https://github.com/zgzhang/cve-2024-6387-poc
- https://www.suse.com/security/cve/CVE-2024-6387.html
- https://github.com/Azure/AKS/issues/4379
- https://github.com/AlmaLinux/updates/issues/629
- https://security.netapp.com/advisory/ntap-20240701-0001/
- https://www.vicarius.io/vsociety/posts/regresshion-an-openssh-regression-error-cve-2024-6387
- https://explore.alas.aws.amazon.com/CVE-2024-6387.html
- https://stackdiary.com/openssh-race-condition-in-sshd-allows-remote-code-execution/
- https://www.freebsd.org/security/advisories/FreeBSD-SA-24:04.openssh.asc
- https://www.arista.com/en/support/advisories-notices/security-advisory/19904-security-advisory-0100
- https://ubuntu.com/security/notices/USN-6859-1
- https://arstechnica.com/security/2024/07/regresshion-vulnerability-in-openssh-gives-attackers-root-on-linux/
- https://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2024-002.txt.asc
- https://www.splunk.com/en_us/blog/security/cve-2024-6387-regresshion-vulnerability.html
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0010
- https://lists.mindrot.org/pipermail/openssh-unix-announce/2024-July/000158.html
- https://lists.mindrot.org/pipermail/openssh-unix-dev/2024-July/041431.html
- https://github.com/PowerShell/Win32-OpenSSH/issues/2249
- https://github.com/microsoft/azurelinux/issues/9555

## Live exploitation data

The [Live Exploit Tracker page](https://tracker.crowdsec.net/cves/CVE-2024-6387) follows observed exploitation activity for CVE-2024-6387. [Request an API key](https://tracker.crowdsec.net/request-api-key) for full access to its exploitation timeline, attacking IP addresses and blocklists.
