cbcvebase.
CVE-2024-6387
published 2024-07-01

CVE-2024-6387: 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…

PriorityP190high8.1CVSS 3.1
AVNACHPRNUINSUCHIHAH
ITWEXPLOITVulnCheck KEVInitial access
Exploited in the wild
EPSS
99.51%
99.9th percentile
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

60 ranges· showing 25
VendorProductVersion rangeFixed in
almalinuxalmalinux
amazonamazon_linux
applemacos>= 12.0 < 12.7.612.7.6
applemacos>= 13.0 < 13.6.813.6.8
applemacos>= 14.0 < 14.614.6
applemacos_monterey
applemacos_sonoma
applemacos_ventura
aristaeos4.32.0 – 4.32.1f
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debianopenssh< openssh 1:9.2p1-2+deb12u3 (bookworm)openssh 1:9.2p1-2+deb12u3 (bookworm)
debianopenssh
freebsdfreebsd< 13.013.0
freebsdfreebsd
freebsdfreebsd
freebsdfreebsd
freebsdfreebsd
freebsdfreebsd>= 13.1 < 13.313.3
freebsdfreebsd>= 13.3-RELEASE < p5p5
freebsdfreebsd>= 14.0-RELEASE < p9p9

Detection & IOCsextracted from sources · hover to see the quote

commandLoginGraceTime 0
processsshd
  • Monitor auth.log (or equivalent) for login attempts with usernames containing shell metacharacters such as backticks (`), dollar signs ($), or parentheses — these are indicators of CVE-2024-6387 exploitation attempts.
  • Alert on suspicious child processes spawned by sshd, particularly unexpected outbound network connections originating from the sshd process tree.
  • Detect exploitation attempts by monitoring for a high volume of SSH connection attempts (~10,000) from a single or rotating set of source IPs — exploitation requires thousands of attempts to trigger the SIGALRM race condition.
  • Use XQL to hunt for vulnerable OpenSSH endpoints: filter on product_major_version = 8 or 9 (minor < 8) to identify exposed instances in Cortex XDR/XSIAM telemetry.
  • Be alert to fake PoC archives circulating on social media (e.g., X/Twitter) purporting to exploit CVE-2024-6387 — these contain malware that modifies system files and retrieves payloads from remote servers, targeting researchers with disabled security controls.
  • Exploitation is only proven on 32-bit glibc-based Linux systems with ASLR; prioritize detection and patching on those platforms first, but do not discount 64-bit systems.
  • ·Vulnerable OpenSSH version ranges: < 4.4p1 (unless backport-patched for CVE-2006-5051 / CVE-2008-4109) and >= 8.5p1 to < 9.8p1. Versions 4.4p1 up to (not including) 8.5p1 are not affected.
  • ·The race condition is triggered when a client fails to authenticate within LoginGraceTime (default 120 seconds), causing SIGALRM to invoke async-signal-unsafe functions (syslog → malloc/free) in the privileged, unsandboxed sshd context.
  • ·Setting LoginGraceTime to 0 in sshd_config mitigates the vulnerability but may introduce denial-of-service risks; it is a temporary workaround, not a fix.
  • ·Backporting by Linux distributions means instances may display a vulnerable version string while actually running a patched build — version-based detection will overcount vulnerable hosts.
  • ·Exploitation on 64-bit systems is theoretically possible but has not been demonstrated; ASLR entropy on x64 makes reliable exploitation highly impractical.

CVSS provenance

nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
osv8.1HIGH
vulncheck8.1HIGH
vendor_cisco8.1HIGH
vendor_debian8.1HIGH
vendor_msrc8.1HIGH
vendor_oracle8.1HIGH
vendor_redhat8.1HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.