RHEL 8 - RCE (CVE-2024-6387)
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.
psychologyCrowdSec Analysis
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.
Full Intelligence Available
Connect your API key to access CrowdSec scores, exploit timelines, and attacker IPs.
| Event | Date |
|---|---|
| CVE Published | 2024-07-01 |
| Rule Released | 2024-07-01 |
| CrowdSec First Seen | 2024-07-01 |
Related Weaknesses
The product uses a signal handler that introduces a race condition.
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
Remediation & Protection
External 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