OpenSSH is a widely-used utility based on the SSH protocol, designed to provide a secure communication channel in a client-server architecture. It is primarily used for file transfers, remote login, and remote server management.
On July 1, 2024, Qualys researchers discovered a new vulnerability (CVE-2024-6387), named RegreSSHion, which potentially exposes over 14 million OpenSSH servers worldwide to complete system takeover. This critical flaw has raised significant concerns within the cybersecurity community, with some comparing it to the infamous 2021 Log4Shell vulnerability.
Understanding the RegreSSHion Vulnerability
The RegreSSHion vulnerability arises from a signal handler race condition in sshd (the OpenSSH server component), which could allow attackers to execute arbitrary code with root privileges. This could enable them to install malware, deploy backdoors, or manipulate data.
RegreSSHion is essentially a regression of a previously patched vulnerability (CVE-2006-5051), reintroduced in 2021 with the release of version 8.5p1. The issue was identified and removed in the recent version 9.8p1. Wiz Research data suggests that around 81% of cloud environments contain vulnerable OpenSSH instances.
Impact and Exploitation Complexity
While the first proof-of-concept (PoC) exploits were published only a few hours after Qualys’s disclosure, there are so far no confirmed active exploitations of the vulnerability. Exploiting this vulnerability is considered relatively complex, requiring an average of 6 to 8 hours of multiple attempts. Such attempts may be detected as brute-force activity by various protection tools.
Moreover, the vulnerability has not been proven exploitable on 64-bit systems or in Windows and macOS environments, further limiting the scope of potential attacks.
Mitigation Strategies
Pending the application of vendor patches, it is recommended to set the LoginGraceTime to 0 in the sshd configuration file. However, this measure may increase the server’s susceptibility to Denial-of-Service (DoS) attacks.
Using Zafran to answer: Am I protected against RegreSSHion?
Zafran customers will now see a clear indication on their dashboard if they are exposed to RegreSSHion and the context to know which vulnerable instances to prioritize for fix.
The platform uses an agentless approach to automatically detect instances of vulnerable OpenSSH, even before the publication of a CVE ID or your scans complete. From there we tell you which ones are loaded in runtime, which are internet facing, and how well your compensating controls protect you today.
During these critical exploitation windows, security teams need to move quickly to also mitigate risk beyond patching. Zafran will recommend mitigations such as enforcing brute force protection on the relevant assets or by implementing CVE-specific IPS rules from the moment they are released.
Taking Proactive Measures
Security teams should prioritize the following actions to protect their systems:
- Patch Management: Upgrade to the latest version of OpenSSH to eliminate the vulnerability.
- Access Controls: Restrict SSH access and avoid exposing OpenSSH servers to the internet.
- Continuous Monitoring: Implement continuous monitoring for newly identified CVEs and other potential threats.
We will update this blog as more information becomes available.