Vulnerabilities > CVE-2018-10933 - Improper Authentication vulnerability in multiple products

047910
CVSS 9.1 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
NONE
network
low complexity
libssh
canonical
debian
redhat
netapp
oracle
CWE-287
critical
nessus
exploit available
metasploit

Summary

A vulnerability was found in libssh's server-side state machine before versions 0.7.6 and 0.8.4. A malicious client could create channels without first performing authentication, resulting in unauthorized access.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Authentication Abuse
    An attacker obtains unauthorized access to an application, service or device either through knowledge of the inherent weaknesses of an authentication mechanism, or by exploiting a flaw in the authentication scheme's implementation. In such an attack an authentication mechanism is functioning but a carefully controlled sequence of events causes the mechanism to grant access to the attacker. This attack may exploit assumptions made by the target's authentication procedures, such as assumptions regarding trust relationships or assumptions regarding the generation of secret values. This attack differs from Authentication Bypass attacks in that Authentication Abuse allows the attacker to be certified as a valid user through illegitimate means, while Authentication Bypass allows the user to access protected material without ever being certified as an authenticated user. This attack does not rely on prior sessions established by successfully authenticating users, as relied upon for the "Exploitation of Session Variables, Resource IDs and other Trusted Credentials" attack patterns.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Utilizing REST's Trust in the System Resource to Register Man in the Middle
    This attack utilizes a REST(REpresentational State Transfer)-style applications' trust in the system resources and environment to place man in the middle once SSL is terminated. Rest applications premise is that they leverage existing infrastructure to deliver web services functionality. An example of this is a Rest application that uses HTTP Get methods and receives a HTTP response with an XML document. These Rest style web services are deployed on existing infrastructure such as Apache and IIS web servers with no SOAP stack required. Unfortunately from a security standpoint, there frequently is no interoperable identity security mechanism deployed, so Rest developers often fall back to SSL to deliver security. In large data centers, SSL is typically terminated at the edge of the network - at the firewall, load balancer, or router. Once the SSL is terminated the HTTP request is in the clear (unless developers have hashed or encrypted the values, but this is rare). The attacker can utilize a sniffer such as Wireshark to snapshot the credentials, such as username and password that are passed in the clear once SSL is terminated. Once the attacker gathers these credentials, they can submit requests to the web service provider just as authorized user do. There is not typically an authentication on the client side, beyond what is passed in the request itself so once this is compromised, then this is generally sufficient to compromise the service's authentication scheme.
  • Man in the Middle Attack
    This type of attack targets the communication between two components (typically client and server). The attacker places himself in the communication channel between the two components. Whenever one component attempts to communicate with the other (data flow, authentication challenges, etc.), the data first goes to the attacker, who has the opportunity to observe or alter it, and it is then passed on to the other component as if it was never intercepted. This interposition is transparent leaving the two compromised components unaware of the potential corruption or leakage of their communications. The potential for Man-in-the-Middle attacks yields an implicit lack of trust in communication or identify between two components.

Exploit-Db

  • idEDB-ID:46307
    last seen2019-02-03
    modified2018-10-20
    published2018-10-20
    reporterExploit-DB
    sourcehttps://www.exploit-db.com/download/46307
    titleLibSSH 0.7.6 / 0.8.4 - Unauthorized Access
  • descriptionlibSSH - Authentication Bypass. CVE-2018-10933. Remote exploit for Linux platform
    fileexploits/linux/remote/45638.py
    idEDB-ID:45638
    last seen2018-11-27
    modified2018-10-18
    platformlinux
    port
    published2018-10-18
    reporterExploit-DB
    sourcehttps://old.exploit-db.com/download/45638/
    titlelibSSH - Authentication Bypass
    typeremote

Metasploit

descriptionThis module exploits an authentication bypass in libssh server code where a USERAUTH_SUCCESS message is sent in place of the expected USERAUTH_REQUEST message. libssh versions 0.6.0 through 0.7.5 and 0.8.0 through 0.8.3 are vulnerable. Note that this module's success depends on whether the server code can trigger the correct (shell/exec) callbacks despite only the state machine's authenticated state being set. Therefore, you may or may not get a shell if the server requires additional code paths to be followed.
idMSF:AUXILIARY/SCANNER/SSH/LIBSSH_AUTH_BYPASS
last seen2020-06-12
modified2019-03-05
published2018-10-17
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/scanner/ssh/libssh_auth_bypass.rb
titlelibssh Authentication Bypass Scanner

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2018-C08CD808D3.NASL
    descriptionUpdate to version 0.8.4 to address CVE-2018-10933 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2019-01-03
    plugin id120760
    published2019-01-03
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/120760
    titleFedora 28 : libssh (2018-c08cd808d3)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory FEDORA-2018-c08cd808d3.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(120760);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2018-10933");
      script_xref(name:"FEDORA", value:"2018-c08cd808d3");
    
      script_name(english:"Fedora 28 : libssh (2018-c08cd808d3)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Update to version 0.8.4 to address CVE-2018-10933
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora update system website.
    Tenable has attempted to automatically clean and format it as much as
    possible without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bodhi.fedoraproject.org/updates/FEDORA-2018-c08cd808d3"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected libssh package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:libssh");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:28");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2018/10/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/10/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/01/03");
      script_set_attribute(attribute:"in_the_news", value:"true");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! preg(pattern:"^28([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 28", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"FC28", reference:"libssh-0.8.4-1.fc28")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libssh");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1548.NASL
    descriptionPeter Winter-Smith of NCC Group discovered that libssh, a tiny C SSH library, contains an authentication bypass vulnerability in the server code. An attacker can take advantage of this flaw to successfully authenticate without any credentials by presenting the server an SSH2_MSG_USERAUTH_SUCCESS message in place of the SSH2_MSG_USERAUTH_REQUEST message which the server would expect to initiate authentication. For Debian 8
    last seen2020-05-16
    modified2018-10-19
    plugin id118214
    published2018-10-19
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118214
    titleDebian DLA-1548-1 : libssh security update
  • NASL familyHuawei Local Security Checks
    NASL idEULEROS_SA-2019-2067.NASL
    descriptionAccording to the version of the libssh package installed, the EulerOS installation on the remote host is affected by the following vulnerability : - A vulnerability was found in libssh
    last seen2020-05-08
    modified2019-09-24
    plugin id129260
    published2019-09-24
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/129260
    titleEulerOS 2.0 SP3 : libssh (EulerOS-SA-2019-2067)
  • NASL familySlackware Local Security Checks
    NASL idSLACKWARE_SSA_2018-289-01.NASL
    descriptionNew libssh packages are available for Slackware 14.0, 14.1, 14.2, and -current to fix a security issue.
    last seen2020-05-16
    modified2018-10-17
    plugin id118168
    published2018-10-17
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118168
    titleSlackware 14.0 / 14.1 / 14.2 / current : libssh (SSA:2018-289-01)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2018-6B390CEB36.NASL
    descriptionUpdate to version 0.8.4 to fix CVE-2018-10933 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2019-01-03
    plugin id120502
    published2019-01-03
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/120502
    titleFedora 29 : libssh (2018-6b390ceb36)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2018-3253-1.NASL
    descriptionThis update for libssh fixes the following issues : Security issue fixed : CVE-2018-10933: Fixed a server mode authentication bypass (bsc#1108020). Non security issue fixed: Fix popd syntax to be compatible with newer versions of the bash shell. Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-05-16
    modified2018-10-22
    plugin id118306
    published2018-10-22
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118306
    titleSUSE SLED12 Security Update : libssh (SUSE-SU-2018:3253-1)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-3795-1.NASL
    descriptionPeter Winter-Smith discovered that libssh incorrectly handled authentication when being used as a server. A remote attacker could use this issue to bypass authentication without any credentials. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-05-16
    modified2018-10-18
    plugin id118200
    published2018-10-18
    reporterUbuntu Security Notice (C) 2018-2019 Canonical, Inc. / NASL script (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118200
    titleUbuntu 14.04 LTS / 16.04 LTS / 18.04 LTS : libssh vulnerability (USN-3795-1)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-4322.NASL
    descriptionPeter Winter-Smith of NCC Group discovered that libssh, a tiny C SSH library, contains an authentication bypass vulnerability in the server code. An attacker can take advantage of this flaw to successfully authenticate without any credentials by presenting the server an SSH2_MSG_USERAUTH_SUCCESS message in place of the SSH2_MSG_USERAUTH_REQUEST message which the server would expect to initiate authentication.
    last seen2020-05-16
    modified2018-10-18
    plugin id118180
    published2018-10-18
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118180
    titleDebian DSA-4322-1 : libssh - security update
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2018-BCA1C1AB49.NASL
    descriptionUpdate to version 0.7.6 to address CVE-2018-10933 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2018-10-22
    plugin id118243
    published2018-10-22
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118243
    titleFedora 27 : libssh (2018-bca1c1ab49)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2018-1207.NASL
    descriptionThis update for libssh fixes the following security issue : - CVE-2018-10933: Fixed a server mode authentication bypass (boo#1108020). This update was imported from the SUSE:SLE-12:Update update project.
    last seen2020-06-05
    modified2018-10-22
    plugin id118250
    published2018-10-22
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118250
    titleopenSUSE Security Update : libssh (openSUSE-2018-1207)
  • NASL familyMisc.
    NASL idLIBSSH_0_8_4_REMOTE.NASL
    descriptionThe remote ssh server is vulnerable to an authentication bypass. An attacker can bypass authentication by presenting SSH2_MSG_USERAUTH_SUCCESS message in place of the SSH2_MSG_USERAUTH_REQUEST method that normally would initiate authentication. Note: This vulnerability was disclosed in a libssh advisory but has also been observed as applicable to other applications and software packages.
    last seen2020-05-16
    modified2018-10-17
    plugin id118154
    published2018-10-17
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118154
    titleSSH Protocol Authentication Bypass (Remote Exploit Check)
  • NASL familyMisc.
    NASL idLIBSSH_0_8_4.NASL
    descriptionAccording to its banner version, the remote libssh based server is vulnerable to an authentication bypass. An attacker can bypass authentication by presenting a SSH2_MSG_USERAUTH_SUCCESS message in place of the SSH2_MSG_USERAUTH_REQUEST method that normally would initiate authentication. Note that Nessus did not actually test for the flaw but instead has relied on the version in the libssh banner so this may be a false positive.
    last seen2020-05-16
    modified2018-10-17
    plugin id118155
    published2018-10-17
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118155
    titlelibssh 0.6.x / 0.7.x < 0.7.6 / 0.8.x < 0.8.4 Authentication Bypass (Remote Version Check)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_2383767CD22411E89623A4BADB2F4699.NASL
    descriptiongladiac reports : libssh versions 0.6 and above have an authentication bypass vulnerability in the server code. By presenting the server an SSH2_MSG_USERAUTH_SUCCESS message in place of the SSH2_MSG_USERAUTH_REQUEST message which the server would expect to initiate authentication, the attacker could successfully authentciate without any credentials.
    last seen2020-05-16
    modified2018-10-18
    plugin id118182
    published2018-10-18
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118182
    titleFreeBSD : libssh -- authentication bypass vulnerability (2383767c-d224-11e8-9623-a4badb2f4699)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-806.NASL
    descriptionThis update for libssh fixes the following issues : - CVE-2018-10933: Fixed a server mode authentication bypass (bsc#1108020). This update was imported from the SUSE:SLE-15:Update update project.
    last seen2020-06-01
    modified2020-06-02
    plugin id123341
    published2019-03-27
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/123341
    titleopenSUSE Security Update : libssh (openSUSE-2019-806)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2018-3162-1.NASL
    descriptionThis update for libssh fixes the following issues : CVE-2018-10933: Fixed a server mode authentication bypass (bsc#1108020). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id120131
    published2019-01-02
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/120131
    titleSUSE SLED15 / SLES15 Security Update : libssh (SUSE-SU-2018:3162-1)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2018-1180.NASL
    descriptionThis update for libssh fixes the following issues : - CVE-2018-10933: Fixed a server mode authentication bypass (bsc#1108020). This update was imported from the SUSE:SLE-15:Update update project.
    last seen2020-06-05
    modified2018-10-18
    plugin id118191
    published2018-10-18
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118191
    titleopenSUSE Security Update : libssh (openSUSE-2018-1180)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-3795-2.NASL
    descriptionUSN-3795-1 fixed a vulnerability in libssh. This update provides the corresponding update for Ubuntu 18.10. Original advisory details : Peter Winter-Smith discovered that libssh incorrectly handled authentication when being used as a server. A remote attacker could use this issue to bypass authentication without any credentials. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-05-16
    modified2018-10-23
    plugin id118325
    published2018-10-23
    reporterUbuntu Security Notice (C) 2018-2019 Canonical, Inc. / NASL script (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/118325
    titleUbuntu 18.10 : libssh vulnerability (USN-3795-2)

Packetstorm

Saint

bid105677
descriptionlibssh authentication bypass
idmisc_lib_libsshver
titlelibssh_auth_bypass
typeremote

The Hacker News

idTHN:964B5C1CA23FD1DE427C22FC59CD0AEC
last seen2018-10-17
modified2018-10-17
published2018-10-17
reporterThe Hacker News
sourcehttps://thehackernews.com/2018/10/libssh-ssh-protocol-library.html
titleLibSSH Flaw Allows Hackers to Take Over Servers Without Password