Cisco has issued a security advisory about a critical remote code execution (RCE) vulnerability named “regreSSHion” affecting multiple products. This vulnerability, identified as CVE-2024-6387, impacts the OpenSSH server (sshd) on glibc-based Linux systems. Disclosed by the Qualys Threat Research Unit on July 1, 2024, the flaw allows unauthenticated attackers to gain root access to affected systems. The issue arises from a regression of an older vulnerability (CVE-2006-5051), reintroduced in OpenSSH version 8.5p1 released in October 2020.
The regreSSHion vulnerability involves a race condition in the sshd’s SIGALRM handler. This handler invokes functions that are not async-signal-safe, such as syslog(). Attackers can exploit this by initiating multiple connections and failing to authenticate within the LoginGraceTime period, triggering the vulnerable signal handler asynchronously. Cisco is actively investigating the extent of the impact across its product line and will update the advisory as more information becomes available.
To mitigate the risk of exploitation, Cisco recommends several steps. Users should restrict SSH access to trusted hosts only by applying infrastructure access control lists (ACLs) to prevent unauthorized access. Upgrading to the latest patched version of OpenSSH (9.8p1) is also advised. Additionally, setting the LoginGraceTime parameter to 0 in the sshd configuration file can prevent the race condition, although this might lead to denial-of-service if all connection slots are occupied.
The vulnerability poses a significant risk to a wide range of Cisco products. Although a proof-of-concept exploit code is available, its use requires customization and there have been no reported instances of malicious exploitation. Cisco urges customers to follow the recommended mitigation steps and apply necessary patches to protect their systems from potential attacks.