Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2018-10933 — CVE-2018-10933 - libssh Authentication Bypass | Kitploit
Tools/GitHubGitHub/k3ystr0k3r/cve-2018-10933
Vulnerability AnalysisExploitationNetwork SecurityPenetration TestingAuthenticationLearning & Education
GitHubk3ystr0k3r/cve-2018-10933

CVE-2018-10933

CVE-2018-10933 - libssh Authentication Bypass

View Repository
112 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2018-10933 - libssh Authentication Bypass

Proof-of-Concept implementation for CVE-2018-10933, a critical authentication bypass vulnerability affecting the server-side implementation of libssh.

Disclaimer

This repository is provided solely for educational purposes, vulnerability research, and authorized security testing. Never test systems without explicit permission.


CVE-2018-10933 is a critical authentication bypass vulnerability discovered in the server-side state machine of libssh.

Unlike traditional authentication flaws involving weak passwords or cryptographic weaknesses, this vulnerability exists because the server incorrectly trusts a protocol message that should only ever be sent from the server to the client.

An attacker can therefore convince a vulnerable libssh server that authentication has already completed successfully without supplying any credentials.

This allows an unauthenticated attacker to establish an authenticated SSH session against vulnerable applications using libssh in server mode.


Vulnerability Information

Download Tool
FieldValue
CVECVE-2018-10933
SeverityCritical
CVSS v39.1
CWECWE-287 (Improper Authentication)
Attack VectorNetwork
User InteractionNone
Privileges RequiredNone

Affected Versions

The vulnerability affects libssh running in server mode.

Affected versions include:

  • libssh 0.6.x
  • libssh 0.7.x prior to 0.7.6
  • libssh 0.8.x prior to 0.8.4

Applications using libssh solely as an SSH client are not vulnerable.


Root Cause

The vulnerability originates from the authentication state machine implemented inside libssh's server code.

During a normal SSH authentication flow:

root@kitploit:~
Client ----------------------> Server

SSH_MSG_USERAUTH_REQUEST
           |
           V
Server validates credentials
           |
           V
SSH_MSG_USERAUTH_SUCCESS
           |
           V
Authenticated Session

The protocol specifies that SSH_MSG_USERAUTH_SUCCESS is generated only by the server after successful authentication.

However, vulnerable versions of libssh fail to properly validate the origin of this message.

Instead of rejecting a client-supplied SSH_MSG_USERAUTH_SUCCESS, the server incorrectly transitions its internal authentication state directly to:

root@kitploit:~
Authenticated = TRUE

without ever verifying credentials.

This is a classic example of Improper Authentication (CWE-287).


Authentication Flow Comparison

Legitimate Authentication

root@kitploit:~
Client
   |
   | USERAUTH_REQUEST
   |
   V
Server

Validate Username
Validate Password
Validate Keys

      |
      V

USERAUTH_SUCCESS

Authenticated

Exploitation

root@kitploit:~
Attacker
    |
    | USERAUTH_SUCCESS
    |
    V
Vulnerable Server

(No validation)

Authenticated

Impact

Successful exploitation allows an unauthenticated attacker to:

  • Bypass authentication
  • Create authenticated SSH channels
  • Execute commands (application dependent)
  • Read sensitive data
  • Modify files
  • Obtain administrative access if the application permits it

The actual impact depends on how the vulnerable application uses libssh after authentication.


Technical Details

The vulnerability exists because the authentication state machine incorrectly accepts the packet:

root@kitploit:~
SSH2_MSG_USERAUTH_SUCCESS

from the client.

Instead of verifying that the packet originated from the server, libssh updates its internal session state as though authentication had completed successfully.

Because later authorization checks rely on this internal state, attackers can immediately open authenticated channels.

This vulnerability does not exploit:

  • Buffer overflows
  • Memory corruption
  • Cryptographic weaknesses
  • Race conditions

Instead, it exploits a logic flaw in protocol state handling.


Exploitation Requirements

The attacker needs:

  • Network connectivity to the SSH service
  • A vulnerable application using libssh in server mode

No:

  • Username
  • Password
  • Private key
  • Valid SSH credentials

are required.


Detection

Potential indicators include:

  • SSH sessions without successful authentication logs
  • Unexpected channel creation
  • Authentication success without corresponding login events
  • Unusual server-side session state transitions

Network IDS signatures may also identify anomalous SSH2_MSG_USERAUTH_SUCCESS packets sent from clients.


Mitigation

Upgrade libssh to one of the patched releases:

  • 0.7.6
  • 0.8.4
  • Any newer maintained version

If upgrading is not immediately possible:

  • Restrict SSH access using firewalls
  • Disable vulnerable services where feasible
  • Monitor authentication logs for anomalies
  • Limit exposure to trusted networks

No reliable workaround exists besides updating the affected software.


References

  • NIST National Vulnerability Database
  • libssh Security Advisory
  • NCC Group Technical Advisory
  • Cisco Security Advisory

Educational Purpose

This repository demonstrates how authentication state machine vulnerabilities can arise from protocol implementation mistakes.

It is intended to assist:

  • Security researchers
  • Penetration testers
  • Blue teams
  • Students studying authentication bypass vulnerabilities

The included Proof-of-Concept illustrates the vulnerability in controlled environments to improve understanding of secure protocol implementation.