Virtual Event: Threat Detection & Incident Response Summit - Watch Now
Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Identity & Access

Libssh Vulnerability Exposes Servers to Attacks

Servers using libssh to implement the Secure Shell (SSH) remote login protocol may be vulnerable to attacks due to the existence of an authentication bypass flaw discovered recently by a researcher.

Servers using libssh to implement the Secure Shell (SSH) remote login protocol may be vulnerable to attacks due to the existence of an authentication bypass flaw discovered recently by a researcher.

Peter Winter-Smith, security consultant at NCC Group, found that versions 0.6 and later of libssh are affected by a flaw that can be exploited by an attacker to authenticate on a server without needing any credentials.

When authentication is initiated, the server expects a SSH2_MSG_USERAUTH_REQUEST message. However, Winter-Smith discovered that an attacker can trick the server into believing authentication was successful by sending it a SSH2_MSG_USERAUTH_SUCCESS message, which is normally only intended for communications from the server to the client.

The vulnerability, tracked as CVE-2018-10933, was patched on Tuesday with the release of libssh 0.8.4 and 0.7.6. The issue was reported to libssh developers on June 25.

An Internet scan conducted with the Shodan search engine shows over 6,300 servers using libssh, and a Censys scan reveals more than 3,300 servers. However, many of them may not be vulnerable to attacks leveraging CVE-2018-10933.

“Not all libSSH servers will necessarily be vulnerable to the authentication bypass,” explained Winter-Smith. “Since the authentication bypass sets the internal libSSH state machine to authenticated without ever giving any registered authentication callbacks an opportunity to execute, servers developed using libSSH which maintain additional custom session state may fail to function correctly if a user is authenticated without this state being created.”

Advertisement. Scroll to continue reading.

Many users were concerned about the risk posed by the vulnerability, especially since libssh is also used by GitHub. However, GitHub clarified that while it applied the patches “out of an abundance of caution,” the vulnerability did not affect its services due to how the library is used.

Experts also clarified that the vulnerability does not impact OpenSSH, libssh2, curl, or libcurl. Linux distributions are affected, but their developers should release patches in the upcoming period.

NCC Group has published a technical advisory for the vulnerability, which also includes proof-of-concept (PoC) code.

“It is important to note that the authentication bypass exploit detailed above is the most obvious route to exploitation for the overarching issue – the libSSH server state machine is vulnerable to being updated by messages intended only for handling on the client side,” Winter-Smith clarified. “Even servers which are not vulnerable to the authentication bypass will may still be vulnerable to other unexpected state manipulation issues, so it is imperative that all services built on top of libSSH are updated even if not demonstrated vulnerable to the authentication bypass.”

Related: Critical Vulnerability Addressed in Popular Code Libraries

Related: Microsoft Patches Code Execution Vulnerability in wimgapi Library

Written By

Eduard Kovacs (@EduardKovacs) is senior managing editor at SecurityWeek. He worked as a high school IT teacher before starting a career in journalism in 2011. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization.

Register

Organizations are investing heavily in third-party risk management, but breaches, delays, and blind spots continue to persist. Join this live webinar as we examine the gap between how organizations think their third-party risk programs are performing and what’s actually happening in practice.

Register

People on the Move

Joe Chen has become Chief Technology Officer at Trellix.

Usercentrics has named Pawan Hegde as COO and Elena Ignatova as CPTO.

SecureAuth has named Mark van Oppen as Chief Revenue Officer.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.