Codequilters

Shopping cart

Subtotal 0.00

View cartCheckout

New OpenSSH Vulnerability Could Lead to RCE as Root on Linux Systems

  • Home
  • cybersecurity
  • New OpenSSH Vulnerability Could Lead to RCE as Root on Linux Systems

OpenSSH maintainers have released security updates to contain a critical security flaw that could result in unauthenticated remote code execution with root privileges in glibc-based Linux systems.

The vulnerability, codenamed regreSSHion, has been assigned the CVE identifier CVE-2024-6387. It resides in the OpenSSH server component, also known as sshd, which is designed to listen for connections from any of the client applications.

“The vulnerability, which is a signal handler race condition in OpenSSH’s server (sshd), allows unauthenticated remote code execution (RCE) as root on glibc-based Linux systems,” Bharat Jogi, senior director of the threat research unit at Qualys, said in a disclosure published today. “This race condition affects sshd in its default configuration.”

The cybersecurity firm said it identified no less than 14 million potentially vulnerable OpenSSH server instances exposed to the internet, adding it’s a regression of an already patched 18-year-old flaw tracked as CVE-2006-5051, with the problem reinstated in October 2020 as part of OpenSSH version 8.5p1.

“Successful exploitation has been demonstrated on 32-bit Linux/glibc systems with [address space layout randomization],” OpenSSH said in an advisory. “Under lab conditions, the attack requires on average 6-8 hours of continuous connections up to the maximum the server will accept.”

The vulnerability impacts versions between 8.5p1 and 9.7p1. Versions prior 4.4p1 are also vulnerable to the race condition bug unless they are patched for CVE-2006-5051 and CVE-2008-4109. It’s worth noting that OpenBSD systems are unaffected as they include a security mechanism that blocks the flaw.It is likely that the security shortcoming also affects both macOS and Windows, although its exploitability on these platforms remains unconfirmed and requires more analysis.

Specifically, Qualys found that if a client does not authenticate within 120 seconds (a setting defined by LoginGraceTime), then sshd’s SIGALRM handler is called asynchronously in a manner that’s not async-signal-safe.

The net effect of exploiting CVE-2024-6387 is a full system compromise and takeover, enabling threat actors to execute arbitrary code with the highest privileges, subvert security mechanisms, data theft, and even maintain persistent access.

“A flaw, once fixed, has reappeared in a subsequent software release, typically due to changes or updates that inadvertently reintroduce the issue,” Jogi said. “This incident highlights the crucial role of thorough regression testing to prevent the reintroduction of known vulnerabilities into the environment.”

While the vulnerability has significant roadblocks due to its remote race condition nature, users are recommended to apply the latest patches to secure against potential threats. It’s also advised to limit SSH access through network-based controls and enforce network segmentation to restrict unauthorized access and lateral movement.

Update#

Cybersecurity firms Palo Alto Networks Unit 42 and Wiz have said the vulnerability is unlikely to be subjected to widespread or opportunistic exploitation, given that an attacker must know in advance what Linux distribution they are targeting in order to build a functional exploit.

Another factor that’s likely to prevent it from being mass exploited is the fact that the attack can take as long as eight hours to complete and require as many as 10,000 authentication steps, as pointed out by Kaspersky, although it doesn’t rule out the possibility of a highly-targeted exploitation.

“The specific nature of the race condition and its exploitation require a significant number of attempts to achieve successful execution, with varying success rates depending on the version and environment,” Oligo said.

Leave A Comment

Your email address will not be published. Required fields are marked *