Vulnerabilities > CVE-2016-5017 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Apache Zookeeper

047910
CVSS 8.1 - HIGH
Attack vector
NETWORK
Attack complexity
HIGH
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
high complexity
apache
CWE-119
nessus

Summary

Buffer overflow in the C cli shell in Apache Zookeeper before 3.4.9 and 3.5.x before 3.5.3, when using the "cmd:" batch mode syntax, allows attackers to have unspecified impact via a long command string.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2016-54A717D5D6.NASL
    descriptionSecurity fix for CVE-2016-5017 (update to 3.4.9) 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
    modified2017-01-03
    plugin id96203
    published2017-01-03
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/96203
    titleFedora 24 : zookeeper (2016-54a717d5d6)
    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-2016-54a717d5d6.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(96203);
      script_version("3.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2016-5017");
      script_xref(name:"FEDORA", value:"2016-54a717d5d6");
    
      script_name(english:"Fedora 24 : zookeeper (2016-54a717d5d6)");
      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:
    "Security fix for CVE-2016-5017 (update to 3.4.9)
    
    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-2016-54a717d5d6"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected zookeeper package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:zookeeper");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:24");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2016/09/21");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/12/31");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/01/03");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-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:"^24([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 24", "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:"FC24", reference:"zookeeper-3.4.9-1.fc24")) 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, "zookeeper");
    }
    
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2016-0012.NASL
    descriptionAn update of [ linux , wget , vim , grub2 , zookeeper , nginx , dnsmasq , haproxy ] packages for PhotonOS has been released.
    last seen2019-02-21
    modified2019-02-07
    plugin id111846
    published2018-08-17
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=111846
    titlePhoton OS 1.0: Dnsmasq / Grub2 / Haproxy / Linux / Nginx / Vim / Wget / Zookeeper PHSA-2016-0012 (deprecated)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # @DEPRECATED@
    #
    # Disabled on 2/7/2019
    #
    
    # The descriptive text and package checks in this plugin were
    # extracted from VMware Security Advisory PHSA-2016-0012. The text
    # itself is copyright (C) VMware, Inc.
    
    include("compat.inc");
    
    if (description)
    {
      script_id(111846);
      script_version("1.3");
      script_cvs_date("Date: 2019/04/05 23:25:07");
    
      script_cve_id(
        "CVE-2015-8370",
        "CVE-2015-8899",
        "CVE-2016-1248",
        "CVE-2016-4450",
        "CVE-2016-5017",
        "CVE-2016-5360",
        "CVE-2016-7098",
        "CVE-2016-9083",
        "CVE-2016-9555"
      );
    
      script_name(english:"Photon OS 1.0: Dnsmasq / Grub2 / Haproxy / Linux / Nginx / Vim / Wget / Zookeeper PHSA-2016-0012 (deprecated)");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "This plugin has been deprecated.");
      script_set_attribute(attribute:"description", value:
    "An update of [ linux , wget , vim , grub2 , zookeeper , nginx ,
    dnsmasq , haproxy ] packages for PhotonOS has been released.");
      # https://github.com/vmware/photon/wiki/Security-Updates-12
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?b465880d");
      script_set_attribute(attribute:"solution", value:"n/a.");
      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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-9555");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2016/12/06");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/17");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:dnsmasq");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:grub2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:haproxy");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:linux");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:nginx");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:vim");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:wget");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:zookeeper");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:vmware:photonos:1.0");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"PhotonOS Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/PhotonOS/release", "Host/PhotonOS/rpm-list");
    
      exit(0);
    }
    
    exit(0, "This plugin has been deprecated.");
    
    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/PhotonOS/release");
    if (isnull(release) || release !~ "^VMware Photon") audit(AUDIT_OS_NOT, "PhotonOS");
    if (release !~ "^VMware Photon (?:Linux|OS) 1\.0(\D|$)") audit(AUDIT_OS_NOT, "PhotonOS 1.0");
    
    if (!get_kb_item("Host/PhotonOS/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, "PhotonOS", cpu);
    
    flag = 0;
    
    pkgs = [
      "dnsmasq-2.76-1.ph1",
      "dnsmasq-debuginfo-2.76-1.ph1",
      "grub2-2.02-5.ph1",
      "grub2-efi-2.02-3.ph1",
      "grub2-efi-lang-2.02-3.ph1",
      "grub2-lang-2.02-5.ph1",
      "haproxy-1.6.10-1.ph1",
      "haproxy-debuginfo-1.6.10-1.ph1",
      "haproxy-doc-1.6.10-1.ph1",
      "linux-4.4.35-1.ph1",
      "linux-api-headers-4.4.35-1.ph1",
      "linux-debuginfo-4.4.35-1.ph1",
      "linux-dev-4.4.35-1.ph1",
      "linux-docs-4.4.35-1.ph1",
      "linux-drivers-gpu-4.4.35-1.ph1",
      "linux-esx-4.4.35-1.ph1",
      "linux-esx-debuginfo-4.4.35-1.ph1",
      "linux-esx-devel-4.4.35-1.ph1",
      "linux-esx-docs-4.4.35-1.ph1",
      "linux-oprofile-4.4.35-1.ph1",
      "linux-sound-4.4.35-1.ph1",
      "linux-tools-4.4.35-1.ph1",
      "linux-tools-debuginfo-4.4.35-1.ph1",
      "nginx-1.10.0-4.ph1",
      "nginx-debuginfo-1.10.0-4.ph1",
      "vim-7.4-6.ph1",
      "vim-extra-7.4-6.ph1",
      "wget-1.18-1.ph1",
      "wget-debuginfo-1.18-1.ph1",
      "zookeeper-3.4.9-1.ph1"
    ];
    
    foreach (pkg in pkgs)
      if (rpm_check(release:"PhotonOS-1.0", reference:pkg)) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        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, "dnsmasq / grub2 / haproxy / linux / nginx / vim / wget / zookeeper");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2016-5557CCF1F9.NASL
    descriptionSecurity fix for CVE-2016-5017 (update to 3.4.9) 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
    modified2017-01-03
    plugin id96204
    published2017-01-03
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/96204
    titleFedora 25 : zookeeper (2016-5557ccf1f9)
    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-2016-5557ccf1f9.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(96204);
      script_version("3.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2016-5017");
      script_xref(name:"FEDORA", value:"2016-5557ccf1f9");
    
      script_name(english:"Fedora 25 : zookeeper (2016-5557ccf1f9)");
      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:
    "Security fix for CVE-2016-5017 (update to 3.4.9)
    
    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-2016-5557ccf1f9"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected zookeeper package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:zookeeper");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:25");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2016/09/21");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/12/31");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/01/03");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-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:"^25([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 25", "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:"FC25", reference:"zookeeper-3.4.9-1.fc25")) 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, "zookeeper");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-630.NASL
    descriptionLyon Yang discovered that the C client shells cli_st and cli_mt of Apache Zookeeper, a high-performance coordination service for distributed applications, were affected by a buffer overflow vulnerability associated with parsing of the input command when using the
    last seen2020-03-17
    modified2016-09-19
    plugin id93570
    published2016-09-19
    reporterThis script is Copyright (C) 2016-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/93570
    titleDebian DLA-630-1 : zookeeper security update
    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 DLA-630-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(93570);
      script_version("2.6");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2016-5017");
    
      script_name(english:"Debian DLA-630-1 : zookeeper security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Lyon Yang discovered that the C client shells cli_st and cli_mt of
    Apache Zookeeper, a high-performance coordination service for
    distributed applications, were affected by a buffer overflow
    vulnerability associated with parsing of the input command when using
    the 'cmd:' batch mode syntax. If the command string exceeds 1024
    characters a buffer overflow will occur.
    
    For Debian 7 'Wheezy', these problems have been fixed in version
    3.3.5+dfsg1-2+deb7u1.
    
    We recommend that you upgrade your zookeeper packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. 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://lists.debian.org/debian-lts-announce/2016/09/msg00023.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/zookeeper"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-java");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-java-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-mt-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-mt2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-st-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-st2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-zookeeper");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeper");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeper-bin");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeperd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2016/09/18");
      script_set_attribute(attribute:"plugin_publication_date", value:"2016/09/19");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2016-2020 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:"7.0", prefix:"libzookeeper-java", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-java-doc", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-mt-dev", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-mt2", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-st-dev", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-st2", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper2", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"python-zookeeper", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeper", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeper-bin", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeperd", reference:"3.3.5+dfsg1-2+deb7u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyMisc.
    NASL idAPACHE_ZOOKEEPER_3_5_3.NASL
    descriptionThe version of Apache ZooKeeper listening on the remote host is prior to 3.4.10 or 3.5.x prior to 3.5.3. It is, therefore, affected by multiple vulnerabilities: - A buffer overflow vulnerability in the C cli shell. Using the
    last seen2020-06-01
    modified2020-06-02
    plugin id125634
    published2019-05-31
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/125634
    titleApache ZooKeeper 3.4.0 < 3.4.10 / 3.5.x < 3.5.3 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(125634);
      script_version("1.2");
      script_cvs_date("Date: 2019/06/04  9:45:00");
    
      script_cve_id("CVE-2016-5017", "CVE-2017-5637");
      script_bugtraq_id(93044,98814);
      script_xref(name:"IAVB", value:"2019-B-0041");
    
      script_name(english:"Apache ZooKeeper 3.4.0 < 3.4.10 / 3.5.x < 3.5.3 Multiple Vulnerabilities");
      script_summary(english:"Checks ZooKeeper version");
    
      script_set_attribute(attribute:"synopsis", value:"The remote Apache ZooKeeper server is 
      affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of Apache ZooKeeper listening on the remote host is prior
    to 3.4.10 or 3.5.x prior to 3.5.3. It is, therefore, affected by multiple
    vulnerabilities:
    
      - A buffer overflow vulnerability in the C cli shell. Using 
        the 'cmd:' batch mode syntax allows attackers to have an 
        unspecified impact via a long command string. 
        (CVE-2016-5017)
    
      - A denial of service (DoS) vulnerability exists in due to two
        four letter word commands which cause CPU spikes on ZooKeeper
        server. An unauthenticated, remote attacker can exploit this 
        issue to cause the application to stop responding. 
        (CVE-2017-5637)");
      script_set_attribute(attribute:"see_also", value:"https://zookeeper.apache.org/security.html");
      script_set_attribute(attribute:"solution", value:
    "Update to Apache ZooKeeper 3.4.10 or 3.5.3 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-5017");
      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:"2016/09/21");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/09/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/05/31");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:zookeeper");
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Misc.");
    
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("apache_zookeeper_detect.nasl");
      script_require_keys("Settings/ParanoidReport");
      script_require_ports("Services/zookeeper", 2181);
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("vcf.inc");
    
    port = get_service(svc:"zookeeper", default:2181, exit_on_fail:TRUE);
    app_info = vcf::get_app_info(app:"Apache Zookeeper", port:port, service:TRUE);
    
    # Paranoid because patch exists unrelated to version
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    constraints = [
      { "fixed_version" : "3.4.10"},
      { "min_version" : "3.5.0", "fixed_version" : "3.5.3" }
    ];
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);