Vulnerabilities > CVE-2003-0826 - Unspecified vulnerability in GNU LSH 1.4/1.4.1/1.4.2

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
gnu
nessus
exploit available

Summary

lsh daemon (lshd) does not properly return from certain functions in (1) read_line.c, (2) channel_commands.c, or (3) client_keyexchange.c when long input is provided, which could allow remote attackers to execute arbitrary code via a heap-based buffer overflow attack.

Vulnerable Configurations

Part Description Count
Application
Gnu
3

Exploit-Db

  • descriptionLSH 1.x Remote Buffer Overflow Vulnerability (1). CVE-2003-0826 . Remote exploit for linux platform
    idEDB-ID:23161
    last seen2016-02-02
    modified2003-09-19
    published2003-09-19
    reporterCarl Livitt
    sourcehttps://www.exploit-db.com/download/23161/
    titleLSH 1.x - Remote Buffer Overflow Vulnerability 1
  • descriptionLSH 1.x Remote Buffer Overflow Vulnerability (2). CVE-2003-0826 . Remote exploit for linux platform
    idEDB-ID:23162
    last seen2016-02-02
    modified2003-09-19
    published2003-09-19
    reporterm00 security
    sourcehttps://www.exploit-db.com/download/23162/
    titleLSH 1.x - Remote Buffer Overflow Vulnerability 2

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_72CDF2AB5B8711DC812D0011098B2F36.NASL
    descriptionSecunia reports : A vulnerability has been reported in LSH, which potentially can be exploited by malicious people to cause a DoS (Denial of Service).
    last seen2020-06-01
    modified2020-06-02
    plugin id29874
    published2008-01-08
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/29874
    titleFreeBSD : lsh -- multiple vulnerabilities (72cdf2ab-5b87-11dc-812d-0011098b2f36)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(29874);
      script_version("1.13");
      script_cvs_date("Date: 2019/08/02 13:32:39");
    
      script_cve_id("CVE-2003-0826", "CVE-2005-0814");
      script_xref(name:"Secunia", value:"14609");
    
      script_name(english:"FreeBSD : lsh -- multiple vulnerabilities (72cdf2ab-5b87-11dc-812d-0011098b2f36)");
      script_summary(english:"Checks for updated package in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote FreeBSD host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Secunia reports :
    
    A vulnerability has been reported in LSH, which potentially can be
    exploited by malicious people to cause a DoS (Denial of Service)."
      );
      # https://vuxml.freebsd.org/freebsd/72cdf2ab-5b87-11dc-812d-0011098b2f36.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?b36d2dd2"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:lsh");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/03/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2007/09/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/01/08");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"lsh<2.0.1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:pkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-717.NASL
    descriptionSeveral security relevant problems have been discovered in lsh, the alternative secure shell v2 (SSH2) protocol server. The Common Vulnerabilities and Exposures project identifies the following vulnerabilities : - CAN-2003-0826 Bennett Todd discovered a heap buffer overflow in lshd which could lead to the execution of arbitrary code. - CAN-2005-0814 Niels Moller discovered a denial of service condition in lshd.
    last seen2020-06-01
    modified2020-06-02
    plugin id18153
    published2005-04-28
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/18153
    titleDebian DSA-717-1 : lsh-utils - buffer overflow, typo
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-717. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(18153);
      script_version("1.21");
      script_cvs_date("Date: 2019/08/02 13:32:18");
    
      script_cve_id("CVE-2003-0826", "CVE-2005-0814");
      script_xref(name:"DSA", value:"717");
    
      script_name(english:"Debian DSA-717-1 : lsh-utils - buffer overflow, typo");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several security relevant problems have been discovered in lsh, the
    alternative secure shell v2 (SSH2) protocol server. The Common
    Vulnerabilities and Exposures project identifies the following
    vulnerabilities :
    
      - CAN-2003-0826
        Bennett Todd discovered a heap buffer overflow in lshd
        which could lead to the execution of arbitrary code.
    
      - CAN-2005-0814
    
        Niels Moller discovered a denial of service condition
        in lshd."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211662"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.debian.org/security/2005/dsa-717"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the lsh-server package.
    
    For the stable distribution (woody) these problems have been fixed in
    version 1.2.5-2woody3."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:lsh-utils");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/04/27");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/04/28");
      script_set_attribute(attribute:"vuln_publication_date", value:"2003/09/20");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 Tenable Network Security, Inc.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"3.0", prefix:"lsh-client", reference:"1.2.5-2woody3")) flag++;
    if (deb_check(release:"3.0", prefix:"lsh-server", reference:"1.2.5-2woody3")) flag++;
    if (deb_check(release:"3.0", prefix:"lsh-utils", reference:"1.2.5-2woody3")) flag++;
    if (deb_check(release:"3.0", prefix:"lsh-utils-doc", reference:"1.2.5-2woody3")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyMisc.
    NASL idLSH_OVERFLOW.NASL
    descriptionAccording to its banner, the version of LSH (a free replacement for SSH) is a version prior to 1.4.3 / 1.5.3. It is, therefore, affected by a buffer overflow vulnerability due to improper handling of user input to the
    last seen2020-06-01
    modified2020-06-02
    plugin id11843
    published2003-09-19
    reporterThis script is Copyright (C) 2003-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/11843
    titleLSH Daemon < 1.4.3 / 1.5.3 lshd Remote Overflow
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    # Ref:
    # From: Haggis <[email protected]>
    # To: [email protected]
    # Subject: Remote root vuln in lsh 1.4.x
    # Date: Fri, 19 Sep 2003 13:01:24 +0000
    # Message-Id: <[email protected]>
    
    include("compat.inc");
    
    if (description)
    {
     script_id(11843);
     script_version("1.15");
     script_cvs_date("Date: 2018/11/15 20:50:23");
    
     script_cve_id("CVE-2003-0826");
     script_bugtraq_id(8655);
     script_xref(name:"EDB-ID", value:"23161");
     script_xref(name:"EDB-ID", value:"23162");
     script_xref(name:"SuSE", value:"SUSE-SA:2003:041");
    
     script_name(english:"LSH Daemon < 1.4.3 / 1.5.3 lshd Remote Overflow");
     script_summary(english:"Checks for the remote SSH version");
    
     script_set_attribute(attribute:"synopsis", value:"The remote SSH server is affected by a buffer overflow vulnerability.");
     script_set_attribute(attribute:"description", value:
    "According to its banner, the version of LSH (a free replacement for
    SSH) is a version prior to 1.4.3 / 1.5.3.  It is, therefore, affected by
    a buffer overflow vulnerability due to improper handling of user input
    to the 'read_line.c', 'channel_commands.c', and 'client_keyexchange.c'
    source files that could allow an attacker to execute arbitrary code or
    cause a denial of service.");
     script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2003/Sep/298");
     script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2003/Sep/314" );
     script_set_attribute(attribute:"solution", value:"Upgrade to LSH 1.4.3 / 1.5.3 or later.");
     script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
     script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
     script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
     script_set_attribute(attribute:"exploit_available", value:"true");
    
     script_set_attribute(attribute:"vuln_publication_date", value:"2003/09/20");
     script_set_attribute(attribute:"patch_publication_date", value:"2003/09/20");
     script_set_attribute(attribute:"plugin_publication_date", value:"2003/09/19");
    
     script_set_attribute(attribute:"potential_vulnerability", value:"true");
     script_set_attribute(attribute:"plugin_type", value:"remote");
     script_set_attribute(attribute:"cpe", value:"cpe:/a:gnu:lsh");
     script_end_attributes();
    
     script_category(ACT_GATHER_INFO);
     script_family(english:"Misc.");
    
     script_copyright(english:"This script is Copyright (C) 2003-2018 Tenable Network Security, Inc.");
    
     script_dependencies("ssh_detect.nasl");
     script_require_keys("Settings/ParanoidReport");
     script_require_ports("Services/ssh", 22);
     exit(0);
    }
    
    #
    # The script code starts here
    #
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    # Ensure the port is open.
    port = get_service(svc:"ssh", default:22, exit_on_fail:TRUE);
    
    # Get banner for service.
    banner = get_kb_item_or_exit("SSH/banner/"+port);
    
    if(egrep(pattern:"lshd[-_](0\.|1\.[0-3]\.|1\.4\.[0-2]([^0-9]|$)|1\.5\.[0-2]([^0-9]|$))", string:banner, icase:TRUE)) security_hole(port);